diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 15 | ||||
-rw-r--r-- | railties/test/generators/shared_generator_tests.rb | 2 |
2 files changed, 17 insertions, 0 deletions
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 diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index 94f69277f5..670f521a0f 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -128,6 +128,7 @@ module SharedGeneratorTests "--skip-active-storage", "--skip-action-mailer", "--skip-action-mailbox", + "--skip-action-text", "--skip-action-cable", "--skip-sprockets" ] @@ -141,6 +142,7 @@ module SharedGeneratorTests assert_file "#{application_path}/config/application.rb", /^# require\s+["']action_mailer\/railtie["']/ unless generator_class.name == "Rails::Generators::PluginGenerator" assert_file "#{application_path}/config/application.rb", /^# require\s+["']action_mailbox\/engine["']/ + assert_file "#{application_path}/config/application.rb", /^# require\s+["']action_text\/engine["']/ end assert_file "#{application_path}/config/application.rb", /^require\s+["']action_view\/railtie["']/ assert_file "#{application_path}/config/application.rb", /^# require\s+["']action_cable\/engine["']/ |