We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6457b38 commit 2bcae6bCopy full SHA for 2bcae6b
tests/testsuite/preprocessor.rs
@@ -44,6 +44,20 @@ fn runs_preprocessors() {
44
assert_eq!(inner.rendered_with, ["html"]);
45
}
46
47
+// Run tests with a custom preprocessor.
48
+#[test]
49
+fn test_with_custom_preprocessor() {
50
+ let test = BookTest::init(|_| {});
51
+ let spy: Arc<Mutex<Inner>> = Default::default();
52
+ let mut book = test.load_book();
53
+ book.with_preprocessor(Spy(Arc::clone(&spy)));
54
+ book.test(vec![]).unwrap();
55
+
56
+ let inner = spy.lock().unwrap();
57
+ assert_eq!(inner.run_count, 0);
58
+ assert_eq!(inner.rendered_with, Vec::<String>::new());
59
+}
60
61
// No-op preprocessor works.
62
#[test]
63
fn nop_preprocessor() {
0 commit comments