aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/app_generator_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index fa7bcfd6d6..938d545219 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -296,6 +296,19 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
end
+ def test_app_update_does_not_generate_assets_initializer_when_skip_sprockets_is_given
+ app_root = File.join(destination_root, "myapp")
+ run_generator [app_root, "--skip-sprockets"]
+
+ stub_rails_application(app_root) do
+ generator = Rails::Generators::AppGenerator.new ["rails"], { update: true, skip_sprockets: true }, { destination_root: app_root, shell: @shell }
+ generator.send(:app_const)
+ quietly { generator.send(:update_config_files) }
+
+ assert_no_file "#{app_root}/config/initializers/assets.rb"
+ end
+ 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"]