mitsuhiko / insta

A snapshot testing library for rust
https://insta.rs
Apache License 2.0
2.26k stars 102 forks source link

Consolidate onto `INSTA_WORKSPACE_ROOT` #614

Closed max-sixty closed 2 months ago

max-sixty commented 2 months ago

Intended to fix #575. Though after some iterations, it ends up being a code-clean-up. I'm not sure how CARGO_MANIFEST_DIR is leaking through — it's only referenced by env! rather than env::var, so should only matter at compile time.

Added a pretty thorough integration test (albeit maybe a bit too complicated)

max-sixty commented 2 months ago

I'll merge now since it's just a refactor and there's a fairly complete test.

This closes #575 insofar as I can't see how that issue exists in the proposed code. But I also can't see how it existed in the recent code, so I'm not confident it's fixed. If there's a reproducible failure, happy to get it working.