assert-rs / snapbox

Snapshot testing for a herd of CLI tests
docs.rs/trycmd
Apache License 2.0
138 stars 18 forks source link

Bug in `assert_matches` deprecation message #327

Closed smoelius closed 6 months ago

smoelius commented 6 months ago

Currently, it says: https://github.com/assert-rs/snapbox/blob/60703c95dd57758100a287686926cdba737ccef8/crates/snapbox/src/lib.rs#L200 I think it should say something like the following?

Replaced with `assert_data_eq!(expected, actual)`
                               ^^^^^^^^^^
smoelius commented 6 months ago

I know it's a little bikesheddy, but can I ask why you went with the actual, expected order?

epage commented 6 months ago

I personally prefer (actual, expected) asserts (and if conditions) but our output is of the model diff expected actual which suggests (expected, actual), so I think that is why (expected, actual) was used. This came up again in #226 and that was enough to push me over the edge to switch them but I still go back and forth.

smoelius commented 6 months ago

Thank you vey much for your reply.