From 8c604cafe1d8375f5b5cc87c9aacb46731be0b1c Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 14 Feb 2024 14:59:07 -0600 Subject: [PATCH] fix(snap): Ensure action env for default asserts --- crates/snapbox/src/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/snapbox/src/lib.rs b/crates/snapbox/src/lib.rs index d845bb22..561d2a0a 100644 --- a/crates/snapbox/src/lib.rs +++ b/crates/snapbox/src/lib.rs @@ -139,7 +139,9 @@ pub type Result = std::result::Result; /// ``` #[track_caller] pub fn assert_eq(expected: impl Into, actual: impl Into) { - Assert::new().eq(expected, actual); + Assert::new() + .action_env(DEFAULT_ACTION_ENV) + .eq(expected, actual); } /// Check if a value matches a pattern @@ -169,7 +171,9 @@ pub fn assert_eq(expected: impl Into, actual: impl Into, actual: impl Into) { - 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