Permalink
Browse files

adding test for namedspaced mailers

  • Loading branch information...
1 parent 990719b commit ae812e9fc9232a56daebd7e20f56a18981480d8c Aditya Sanghi committed with mikel Oct 6, 2010
Showing with 9 additions and 0 deletions.
  1. +9 −0 railties/test/generators/mailer_generator_test.rb
@@ -59,6 +59,15 @@ def test_logs_if_the_template_engine_cannot_be_found
assert_match /haml \[not found\]/, content
end
+ def test_mailer_with_namedspaced_mailer
+ run_generator ["Farm::Animal", "moos"]
+ assert_file "app/mailers/farm/animal.rb" do |mailer|
+ assert_match /class Farm::Animal < ActionMailer::Base/, mailer
+ assert_match /en\.farm\.animal\.moos\.subject/, mailer
+ end
+ assert_file "app/views/farm/animal/moos.text.erb"
+ end
+
def test_actions_are_turned_into_methods
run_generator

0 comments on commit ae812e9

Please sign in to comment.