Added a test to make sure book.toml isn't required

This commit is contained in:
Michael Bryan 2017-12-09 20:46:39 +11:00
parent 8ee795045a
commit 42ff5a895c
No known key found for this signature in database
GPG Key ID: E9C602B0D9A998DC
1 changed files with 11 additions and 0 deletions

View File

@ -51,3 +51,14 @@ fn run_mdbook_init_with_custom_book_and_src_locations() {
assert!(target.exists(), "{} should have been created by `mdbook init`", file); assert!(target.exists(), "{} should have been created by `mdbook init`", file);
} }
} }
#[test]
fn book_toml_isnt_required() {
let temp = TempDir::new("mdbook").unwrap();
let mut md = MDBook::new(temp.path());
md.init().unwrap();
assert!(!temp.path().join("book.toml").exists());
md.read_config().unwrap().build().unwrap();
}