From a42ec22b0b4a8e0f966d53d2cf60f07b1445077e Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sun, 14 Aug 2016 11:19:16 +0900 Subject: remove "test/mailers" directory when skipping action-mailer Related to #26146 --- railties/lib/rails/generators/rails/app/app_generator.rb | 1 + railties/test/generators/app_generator_test.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index a1b1649547..ebb8aa62da 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -325,6 +325,7 @@ module Rails remove_file "app/views/layouts/mailer.html.erb" remove_file "app/views/layouts/mailer.text.erb" remove_dir "app/mailers" + remove_dir "test/mailers" end end diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 3b149d6cf9..60b8cb2701 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -381,6 +381,7 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_no_match(/config\.action_mailer/, content) end assert_no_directory "app/mailers" + assert_no_directory "test/mailers" end def test_generator_has_assets_gems -- cgit v1.2.3