~michaelforrest/use-case-mapper/trunk

« back to all changes in this revision

Viewing changes to vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb

  • Committer: Richard Lee (Canonical)
  • Date: 2010-10-15 15:17:58 UTC
  • mfrom: (190.1.3 use-case-mapper)
  • Revision ID: richard.lee@canonical.com-20101015151758-wcvmfxrexsongf9d
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
require 'test_helper'
2
 
 
3
 
class <%= class_name %>Test < ActionMailer::TestCase
4
 
<% for action in actions -%>
5
 
  test "<%= action %>" do
6
 
    @expected.subject = '<%= class_name %>#<%= action %>'
7
 
    @expected.body    = read_fixture('<%= action %>')
8
 
    @expected.date    = Time.now
9
 
 
10
 
    assert_equal @expected.encoded, <%= class_name %>.create_<%= action %>(@expected.date).encoded
11
 
  end
12
 
 
13
 
<% end -%>
14
 
<% if actions.blank? -%>
15
 
  # replace this with your real tests
16
 
  test "the truth" do
17
 
    assert true
18
 
  end
19
 
<% end -%>
20
 
end