mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
053a4c6990
commit
373a568324
2 changed files with 12 additions and 1 deletions
|
@ -439,7 +439,7 @@ module Rails
|
|||
end
|
||||
|
||||
def depend_on_bootsnap?
|
||||
!options[:skip_bootsnap]
|
||||
!options[:skip_bootsnap] && !options[:dev]
|
||||
end
|
||||
|
||||
def os_supports_listen_out_of_the_box?
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue