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.
--ignore git
1 parent f93b267 commit 5e60435Copy full SHA for 5e60435
tests/testsuite/init.rs
@@ -251,3 +251,25 @@ theme/index.hbs
251
"#]],
252
);
253
}
254
+
255
+/// Run `mdbook init` with `--ignore git` to create a `.gitignore` file
256
+#[test]
257
+fn init_with_ignore_git_creates_gitignore() {
258
+ let mut test = BookTest::empty();
259
+ test.run("init --ignore git", |cmd| {
260
+ cmd.expect_stdout(str![[r#"
261
+What title would you like to give the book?
262
263
+All done, no errors...
264
265
+"#]]);
266
+ })
267
+ .check_file(
268
+ ".gitignore",
269
+ str![[r#"
270
+book
271
272
+"#]],
273
+ );
274
+ assert!(test.dir.join(".gitignore").exists());
275
+}
0 commit comments