Skip to content

Commit

Permalink
refactor(assert): Transition from Assert::eq,matches
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed May 17, 2024
1 parent 6763214 commit 363181e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/snapbox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ pub type Error = assert::Error;
pub fn assert_eq(expected: impl Into<crate::Data>, actual: impl Into<crate::Data>) {
Assert::new()
.action_env(assert::DEFAULT_ACTION_ENV)
.eq(expected, actual);
.eq_(actual, expected.into().raw());
}

/// Check if a value matches a pattern
Expand Down Expand Up @@ -184,7 +184,7 @@ pub fn assert_eq(expected: impl Into<crate::Data>, actual: impl Into<crate::Data
pub fn assert_matches(pattern: impl Into<crate::Data>, actual: impl Into<crate::Data>) {
Assert::new()
.action_env(assert::DEFAULT_ACTION_ENV)
.matches(pattern, actual);
.eq_(actual, pattern);
}

/// Check if a path matches the content of another path, recursively
Expand Down
2 changes: 1 addition & 1 deletion crates/trycmd/tests/testsuite/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ fn dump_schema() {
snapbox::cmd::Command::new(bin_path)
.assert()
.success()
.stdout_eq(snapbox::file!["../../schema.json"]);
.stdout_eq_(snapbox::file!["../../schema.json"]);
}

0 comments on commit 363181e

Please sign in to comment.