提交 0c0e58c9 编写于 作者: K kennyj

Don't run bundle install when passed with --pretend option

上级 40b21897
......@@ -248,7 +248,7 @@ def bundle_command(command)
end
def run_bundle
bundle_command('install') unless options[:skip_gemfile] || options[:skip_bundle]
bundle_command('install') unless options[:skip_gemfile] || options[:skip_bundle] || options[:pretend]
end
def empty_directory_with_gitkeep(destination, config = {})
......
......@@ -355,6 +355,11 @@ def test_active_record_dependent_restrict_raises_is_present_application_config
assert_file "config/application.rb", /config\.active_record\.dependent_restrict_raises = false/
end
def test_pretend_option
output = run_generator [File.join(destination_root, "myapp"), "--pretend"]
assert_no_match(/run bundle install/, output)
end
protected
def action(*args, &block)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册