提交 7fa5f38c 编写于 作者: Y yuuji.yaginuma

do not run `git init` when specify the `pretend` option

When specifying the `pretend` option, expect that no processing will be
done, so do not execute `git init` as well.
上级 2d61745a
......@@ -54,7 +54,7 @@ def gitignore
end
def version_control
unless options[:skip_git]
if !options[:skip_git] && !options[:pretend]
run "git init"
end
end
......
......@@ -592,6 +592,7 @@ def test_no_active_record_or_tests_if_skips_given
def test_pretend_option
output = run_generator [File.join(destination_root, "myapp"), "--pretend"]
assert_no_match(/run bundle install/, output)
assert_no_match(/run git init/, output)
end
def test_application_name_with_spaces
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册