GitSnapshot (git_snapshot v0.1.8)
View SourceGitSnapshot is a library for snapshot testing using git.
This library takes string snaphots (see GitSnapshot.Snapshot) and stores
them on disk. When a file exists the current test value will be compared to
the staged content of that file.
If the compared values are equal everything is fine.
If the compared values are not equal the file is overwritten with the new value
and an ExUnit.AssertionError is raised for the test to fail. The changed
value can become accepted by staging the updated file contents.
Summary
Functions
Assert on a image.
Assert on json data.
Assert on a snapshot.
Assert over multiple snapshots.
Functions
Assert on a image.
Example
test "name", context do
assert_image(context, "file_name.png", image)end
Assert on json data.
Options
See Jason.decode/2.
Example
test "name", context do
assert_json(context, "file_name", "value")end
Assert on a snapshot.
Example
test "name", context do
assert_snapshot(context, "file_name", "value")end
Assert over multiple snapshots.