From 86a12b6f2932ba1a3b5f0417688ffe34ea6bab25 Mon Sep 17 00:00:00 2001
From: "yuuji.yaginuma" <yuuji.yaginuma@gmail.com>
Date: Fri, 19 Oct 2018 17:56:09 +0900
Subject: 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.
---
 railties/test/generators/app_generator_test.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index be97abfa52..e47d180809 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -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|
-- 
cgit v1.2.3