diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-12-19 08:50:46 +0900 |
---|---|---|
committer | Yuji Yaginuma <yuuji.yaginuma@gmail.com> | 2017-12-19 10:15:47 +0900 |
commit | 373a5683240f85d3538fbeeb3eca624c4cb0c90a (patch) | |
tree | 44c0ccc40dcb5bd1693ebd0a5247d03ba102b598 /railties/test/generators | |
parent | 053a4c699043ea5449effaba0549b2f8a5821228 (diff) | |
download | rails-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/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 11 |
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 |