blob: 2f694e431c577443e048dcc6ca040c72249e1976 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
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.body = read_fixture("<%= action %>")
@expected.date = Time.now
assert_difference "<%= class_name %>.deliveries.size" do
@actual.deliver
end
assert_equal @expected.encoded, @actual.encoded
end
<% end -%>
<% if actions.blank? -%>
# replace this with your real tests
test "the truth" do
assert true
end
<% end -%>
end
|