aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-08-16 05:01:30 -0300
committerGitHub <noreply@github.com>2016-08-16 05:01:30 -0300
commit3fc0bbf008f0e935ab56559f119c9ea8250bfddd (patch)
tree9124f1d051745a791c4a9e0507bf175ecd234613
parent4497b53ee91768ad48d66ed05800517eeb73d858 (diff)
parenta42ec22b0b4a8e0f966d53d2cf60f07b1445077e (diff)
downloadrails-3fc0bbf008f0e935ab56559f119c9ea8250bfddd.tar.gz
rails-3fc0bbf008f0e935ab56559f119c9ea8250bfddd.tar.bz2
rails-3fc0bbf008f0e935ab56559f119c9ea8250bfddd.zip
Merge pull request #26157 from y-yagi/remove_test_mailers_when_skipping_action-mailer
remove "test/mailers" directory when skipping action-mailer
-rw-r--r--railties/lib/rails/generators/rails/app/app_generator.rb1
-rw-r--r--railties/test/generators/app_generator_test.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index 946645ee2d..9f9c50ca10 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 77e484184c..acab83799d 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