assert-or-bless 0.1.0

Assert that a multi-line string equals the contents of a blessable snapshot file. Print a nice colored diff if not.
Documentation
assert-or-bless-0.1.0 has been yanked.

Audit the code

This crate is ~30 lines of code. Audit with the following one-liner, but make sure you follow to the crates.io Data Access Policy:

curl -H "User-Agent: $USER at $HOST" \
     -L https://crates.io/api/v1/crates/assert-or-bless/0.1.0/download |
         tar --extract --gzip --to-stdout | less

Usage

Write a test:

#[test]
fn check_snapshot() {
    let output_to_check == "...";
    assert_or_bless::assert_eq_or_bless(output_to_check, "snapshot.txt");
}

Bless current output (write the snapshot file):

ASSERT_OR_BLESS=bless cargo test

Assert current output (compare with existing snapshot file):

cargo test