aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb
blob: dcd02062110f63b35640e445c2cf833f0c096778 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'

class <%= class_name %>Test < ActionMailer::TestCase
  tests <%= class_name %>
<% for action in actions -%>
  def test_<%= action %>
    @expected.subject = '<%= class_name %>#<%= action %>'
    @expected.body    = read_fixture('<%= action %>')
    @expected.date    = Time.now

    assert_equal @expected.encoded, <%= class_name %>.create_<%= action %>(@expected.date).encoded
  end

<% end -%>
<% if actions.blank? -%>
  # replace this with your real tests
  def test_truth
    assert true
  end
<% end -%>
end