adding test for namedspaced mailers

This commit is contained in:
Aditya Sanghi 2010-10-06 11:59:11 +05:30 committed by Mikel Lindsaar
parent 990719bb59
commit ae812e9fc9
1 changed files with 9 additions and 0 deletions

View File

@ -59,6 +59,15 @@ class MailerGeneratorTest < Rails::Generators::TestCase
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