Skip to content

Commit

Permalink
adding test for namedspaced mailers
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya Sanghi authored and mikel committed Oct 6, 2010
1 parent accc567 commit af53ed8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions railties/test/generators/mailer_generator_test.rb
Expand Up @@ -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

Expand Down

0 comments on commit af53ed8

Please sign in to comment.