Avoid running bundler on tests that don't need it

If the dev option is specified, Gemfile contains gem which specifies GitHub.
This will take time to execute, so should avoid it in unnecessary tests.
This commit is contained in:
yuuji.yaginuma 2018-10-19 17:56:09 +09:00
parent d197059666
commit 86a12b6f29
1 changed files with 3 additions and 3 deletions

View File

@ -710,7 +710,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
def test_web_console_with_dev_option
run_generator [destination_root, "--dev"]
run_generator [destination_root, "--dev", "--skip-bundle"]
assert_file "Gemfile" do |content|
assert_match(/gem 'web-console',\s+github: 'rails\/web-console'/, content)
@ -780,7 +780,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
def test_spring_with_dev_option
run_generator [destination_root, "--dev"]
run_generator [destination_root, "--dev", "--skip-bundle"]
assert_no_gem "spring"
end
@ -878,7 +878,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
def test_bootsnap_with_dev_option
run_generator [destination_root, "--dev"]
run_generator [destination_root, "--dev", "--skip-bundle"]
assert_no_gem "bootsnap"
assert_file "config/boot.rb" do |content|