👑 Rust Goldenfile
Simple goldenfile testing in Rust.
Goldenfile tests generate one or more output files as they run. If any files differ from their checked-in "golden" version, the test fails. This ensures that behavioral changes are intentional, explicit, and version controlled.
You can use goldenfiles to test the output of a parser, the order of a graph traversal, the result of a simulation, or anything else that should only change with human review.
Usage
extern crate goldenfile;
use Write;
use Mint;
When the Mint
goes out of scope, it compares the contents of each file to its checked-in golden version and fails the test if they differ. To update the checked-in versions, run:
UPDATE_GOLDENFILES=1
Contributing
Pull requests are welcome! This project follows the Rust community's Code of Conduct.