mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Skip bootsnap
contents in app:update
task if bootsnap
is not used
This commit is contained in:
parent
1c70756e1a
commit
9a1b99eb01
2 changed files with 14 additions and 0 deletions
|
@ -27,6 +27,7 @@ module Rails
|
|||
options[:skip_action_cable] = !defined?(ActionCable::Engine)
|
||||
options[:skip_sprockets] = !defined?(Sprockets::Railtie)
|
||||
options[:skip_puma] = !defined?(Puma)
|
||||
options[:skip_bootsnap] = !defined?(Bootsnap)
|
||||
options
|
||||
end
|
||||
end
|
||||
|
|
|
@ -323,6 +323,19 @@ class AppGeneratorTest < Rails::Generators::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_app_update_does_not_generate_bootsnap_contents_when_skip_bootsnap_is_given
|
||||
app_root = File.join(destination_root, "myapp")
|
||||
run_generator [app_root, "--skip-bootsnap"]
|
||||
|
||||
FileUtils.cd(app_root) do
|
||||
quietly { system("bin/rails app:update") }
|
||||
end
|
||||
|
||||
assert_file "#{app_root}/config/boot.rb" do |content|
|
||||
assert_no_match(/require 'bootsnap\/setup'/, content)
|
||||
end
|
||||
end
|
||||
|
||||
def test_gem_for_active_storage
|
||||
run_generator
|
||||
assert_file "Gemfile", /^# gem 'image_processing'/
|
||||
|
|
Loading…
Reference in a new issue