aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-12-19 08:50:46 +0900
committerYuji Yaginuma <yuuji.yaginuma@gmail.com>2017-12-19 10:15:47 +0900
commit373a5683240f85d3538fbeeb3eca624c4cb0c90a (patch)
tree44c0ccc40dcb5bd1693ebd0a5247d03ba102b598 /railties/test
parent053a4c699043ea5449effaba0549b2f8a5821228 (diff)
downloadrails-373a5683240f85d3538fbeeb3eca624c4cb0c90a.tar.gz
rails-373a5683240f85d3538fbeeb3eca624c4cb0c90a.tar.bz2
rails-373a5683240f85d3538fbeeb3eca624c4cb0c90a.zip
Implicitly skip bootsnap for `rails new --dev`
Specifying the `--dev` option is when want to change the codebase, as it is not necessary to cache it. Context: https://github.com/rails/rails/pull/31485#issuecomment-352452653
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 9fc63755ae..110aca70c1 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -812,6 +812,17 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
end
+ def test_bootsnap_with_dev_option
+ run_generator [destination_root, "--dev"]
+
+ assert_file "Gemfile" do |content|
+ assert_no_match(/bootsnap/, content)
+ end
+ assert_file "config/boot.rb" do |content|
+ assert_no_match(/require 'bootsnap\/setup'/, content)
+ end
+ end
+
def test_inclusion_of_ruby_version
run_generator