Skip to content

Commit

Permalink
Attend to brittle mailer generator tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Jan 28, 2010
1 parent fd0eb3d commit 0797142
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions railties/test/generators/mailer_generator_test.rb
Expand Up @@ -9,7 +9,7 @@ def test_mailer_skeleton_is_created
run_generator
assert_file "app/mailers/notifier.rb" do |mailer|
assert_match /class Notifier < ActionMailer::Base/, mailer
assert_match /self\.defaults :from => "from@example.com"/, mailer
assert_match /defaults :from => "from@example.com"/, mailer
end
end

Expand Down Expand Up @@ -61,12 +61,12 @@ def test_actions_are_turned_into_methods

assert_file "app/mailers/notifier.rb" do |mailer|
assert_instance_method :foo, mailer do |foo|
assert_match /mail\(:to => "to@example.org"\)/, foo
assert_match /mail :to => "to@example.org"/, foo
assert_match /@greeting = "Hi"/, foo
end

assert_instance_method :bar, mailer do |bar|
assert_match /mail\(:to => "to@example.org"\)/, bar
assert_match /mail :to => "to@example.org"/, bar
assert_match /@greeting = "Hi"/, bar
end
end
Expand Down

0 comments on commit 0797142

Please sign in to comment.