From 6b8048173d4a0176c9ab4694ba0f6ff331b20619 Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Sat, 5 Jan 2019 13:50:09 +0200 Subject: Add `--skip-action-text` option to `rails new` Since PR#34816 was merged in c6ef670aee186a2880b7be59c4c6892b5c983e58, we should add this option for flexibility, and consistency. --- railties/test/generators/app_generator_test.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'railties/test/generators/app_generator_test.rb') diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index f287827f81..47e401c34f 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -450,6 +450,21 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_file "#{application_path}/config/application.rb", /#\s+require\s+["']action_mailbox\/engine["']/ end + def test_generator_skips_action_text_when_skip_action_text_is_given + run_generator [destination_root, "--skip-action-text"] + assert_file "#{application_path}/config/application.rb", /#\s+require\s+["']action_text\/engine["']/ + end + + def test_generator_skips_action_text_when_skip_active_record_is_given + run_generator [destination_root, "--skip-active-record"] + assert_file "#{application_path}/config/application.rb", /#\s+require\s+["']action_text\/engine["']/ + end + + def test_generator_skips_action_text_when_skip_active_storage_is_given + run_generator [destination_root, "--skip-active-storage"] + assert_file "#{application_path}/config/application.rb", /#\s+require\s+["']action_text\/engine["']/ + end + def test_app_update_does_not_change_config_target_version run_generator -- cgit v1.2.3