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

@ -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