insta-cmd
insta-cmd copied to clipboard
Snapshots via `cargo run`
Is there a reason to target the binary directly and not sit on top of cargo run
?
You can even target the built test binary directly with Command::new(env!("CARGO_BIN_EXE_<name>")).args([])
where <name>
is the [[bin]]
name.
@mitsuhiko Probably worth to change here: https://docs.rs/insta-cmd/latest/insta_cmd/#testing-binaries
As explained here: https://github.com/iqlusioninc/abscissa/issues/845
And the reason not to use something cargo run
based, is also explained there.
I don't remember when this was added, or if I had just missed it, but get_cargo_bin
works.
I don't remember when this was added, or if I had just missed it, but
get_cargo_bin
works.
Ah, nice! :D