Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshots via cargo run #8

Closed
cnpryer opened this issue Jul 17, 2023 · 3 comments
Closed

Snapshots via cargo run #8

cnpryer opened this issue Jul 17, 2023 · 3 comments

Comments

@cnpryer
Copy link

cnpryer commented Jul 17, 2023

Is there a reason to target the binary directly and not sit on top of cargo run?

@simonsan
Copy link

simonsan commented Mar 1, 2024

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: iqlusioninc/abscissa#845

And the reason not to use something cargo run based, is also explained there.

@cnpryer
Copy link
Author

cnpryer commented May 3, 2024

I don't remember when this was added, or if I had just missed it, but get_cargo_bin works.

@cnpryer cnpryer closed this as completed May 3, 2024
@simonsan
Copy link

simonsan commented May 4, 2024

I don't remember when this was added, or if I had just missed it, but get_cargo_bin works.

Ah, nice! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants