aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorYuji Yaginuma <yuuji.yaginuma@gmail.com>2018-05-14 07:29:03 +0900
committerGitHub <noreply@github.com>2018-05-14 07:29:03 +0900
commitdf850b8d7126044a820291bbfd2bce80636a442c (patch)
tree83a9ef2dd01030e1366d53b4ba242a431fdc9526 /railties/test
parent448cb2148c1cfcef25b2c8964d8320f613e19c7c (diff)
parent8efa112ca625cf8e895ed5af1433dce430929970 (diff)
downloadrails-df850b8d7126044a820291bbfd2bce80636a442c.tar.gz
rails-df850b8d7126044a820291bbfd2bce80636a442c.tar.bz2
rails-df850b8d7126044a820291bbfd2bce80636a442c.zip
Merge pull request #32837 from ttanimichi/app-update-skip-spring
Don't generate `config/spring.rb` in `app:update` task when spring isn't loaded
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/app_generator_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index bcfbcdfd80..f73747208b 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -309,6 +309,17 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
end
+ def test_app_update_does_not_generate_spring_contents_when_skip_spring_is_given
+ app_root = File.join(destination_root, "myapp")
+ run_generator [app_root, "--skip-spring"]
+
+ FileUtils.cd(app_root) do
+ quietly { system("bin/rails app:update") }
+ end
+
+ assert_no_file "#{app_root}/config/spring.rb"
+ end
+
def test_app_update_does_not_generate_action_cable_contents_when_skip_action_cable_is_given
app_root = File.join(destination_root, "myapp")
run_generator [app_root, "--skip-action-cable"]