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.
2 parents 4b266f1 + 5fa9f12 commit 6d6bee0Copy full SHA for 6d6bee0
src/book/book.rs
@@ -647,4 +647,19 @@ And here is some \
647
let got = load_book_from_disk(&summary, temp.path());
648
assert!(got.is_err());
649
}
650
+
651
+ #[test]
652
+ fn cant_open_summary_md() {
653
+ let cfg = BuildConfig::default();
654
+ let temp_dir = TempFileBuilder::new().prefix("book").tempdir().unwrap();
655
656
+ let got = load_book(&temp_dir, &cfg);
657
+ assert!(got.is_err());
658
+ let error_message = got.err().unwrap().to_string();
659
+ let expeceted = format!(
660
+ r#"Couldn't open SUMMARY.md in {:?} directory"#,
661
+ temp_dir.path()
662
+ );
663
+ assert_eq!(error_message, expeceted);
664
+ }
665
0 commit comments