aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/test_unit/mailer/templates/functional_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/generators/test_unit/mailer/templates/functional_test.rb')
-rw-r--r--railties/lib/generators/test_unit/mailer/templates/functional_test.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb
index 2f694e431c..fcebb40135 100644
--- a/railties/lib/generators/test_unit/mailer/templates/functional_test.rb
+++ b/railties/lib/generators/test_unit/mailer/templates/functional_test.rb
@@ -3,17 +3,13 @@ require 'test_helper'
class <%= class_name %>Test < ActionMailer::TestCase
<% for action in actions -%>
test "<%= action %>" do
- @actual = <%= class_name %>.<%= action %>
-
@expected.subject = <%= action.to_s.humanize.inspect %>
+ @expected.to = "to@example.com"
+ @expected.from = "from@example.com"
@expected.body = read_fixture("<%= action %>")
@expected.date = Time.now
- assert_difference "<%= class_name %>.deliveries.size" do
- @actual.deliver
- end
-
- assert_equal @expected.encoded, @actual.encoded
+ assert_equal @expected, <%= class_name %>.<%= action %>
end
<% end -%>