From bd06746b312c38bb2bad42e7e24fc632b84afaef Mon Sep 17 00:00:00 2001 From: Joseph O'Brien <98370624+89jobrien@users.noreply.github.com> Date: Wed, 1 Apr 2026 06:33:34 -0400 Subject: [PATCH] test(integration): improve cross_crate test clarity --- tests/integration/tests/cross_crate.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/tests/cross_crate.rs b/tests/integration/tests/cross_crate.rs index 1298ae9..bb73656 100644 --- a/tests/integration/tests/cross_crate.rs +++ b/tests/integration/tests/cross_crate.rs @@ -19,7 +19,7 @@ fn test_nothooks_notsecrets_independent() { fs::write(&key_path, "AGE-SECRET-KEY-1CROSSCRATE\n").unwrap(); let sources: Vec> = vec![Box::new(FileSource::new(key_path))]; - let key = resolve_age_key(sources).unwrap(); + let key = resolve_age_key(sources).expect("resolve_age_key failed"); assert!( key.trim().starts_with("AGE-SECRET-KEY-"), "expected age key prefix, got: {key:?}" @@ -70,7 +70,7 @@ fn test_notfiles_respects_default_ignore() { fs::write(pkg.join(".nothooks-state.toml"), "# state\n").unwrap(); let opts = LinkOptions { force: false, no_backup: false, dry_run: false, verbose: false }; - let state = link(d, &[], &opts).unwrap(); + let state = link(d, &[], &opts).expect("link() failed"); // foo.txt linked assert!( @@ -102,11 +102,11 @@ fn test_notfiles_respects_default_ignore() { }) .collect(); assert!( - !names.contains(&".notfiles-state.toml".to_string()), + !names.iter().any(|n| n == ".notfiles-state.toml"), ".notfiles-state.toml must not be in state entries" ); assert!( - !names.contains(&".nothooks-state.toml".to_string()), + !names.iter().any(|n| n == ".nothooks-state.toml"), ".nothooks-state.toml must not be in state entries" ); }