Skip to content

Commit 3b0d0b6

Browse files
committed
✅ update tests to test new _with functionality
1 parent 393c7f4 commit 3b0d0b6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/integration.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ use predicates::prelude::*;
33

44
#[test]
55
fn test_example_output_default_level() {
6-
// This is the canonical way to run an example and test its output.
76
let mut cmd = Command::new("cargo");
87
cmd.args(["run", "--example", "simple", "--quiet"]);
98

109
cmd.assert()
1110
.stdout(predicate::str::contains("hello from the example"))
1211
.stdout(predicate::str::contains("this is a warning"))
1312
.stdout(predicate::str::contains("this is an error"))
13+
.stdout(predicate::str::contains("user signed in"))
14+
.stdout(predicate::str::contains("cache miss"))
15+
.stdout(predicate::str::contains("db failure"))
16+
.stdout(predicate::str::contains("loaded config").not()) // debug only
1417
.stdout(predicate::str::contains("this is a debug message").not())
1518
.success();
1619
}
@@ -23,6 +26,7 @@ fn test_example_output_debug_level() {
2326

2427
cmd.assert()
2528
.stdout(predicate::str::contains("this is a debug message"))
29+
.stdout(predicate::str::contains("loaded config"))
2630
.success();
2731
}
2832

0 commit comments

Comments
 (0)