Skip to content

Commit

Permalink
fix(snap): Ensure action env for default asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Feb 14, 2024
1 parent 5c5d0eb commit 8c604ca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/snapbox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
/// ```
#[track_caller]
pub fn assert_eq(expected: impl Into<crate::Data>, actual: impl Into<crate::Data>) {
Assert::new().eq(expected, actual);
Assert::new()
.action_env(DEFAULT_ACTION_ENV)
.eq(expected, actual);
}

/// Check if a value matches a pattern
Expand Down Expand Up @@ -169,7 +171,9 @@ pub fn assert_eq(expected: impl Into<crate::Data>, actual: impl Into<crate::Data
/// ```
#[track_caller]
pub fn assert_matches(pattern: impl Into<crate::Data>, actual: impl Into<crate::Data>) {
Assert::new().matches(pattern, actual);
Assert::new()
.action_env(DEFAULT_ACTION_ENV)
.matches(pattern, actual);
}

/// Check if a path matches the content of another path, recursively
Expand Down

0 comments on commit 8c604ca

Please sign in to comment.