instiki/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb
Jacques Distler 5292899c9a Rails 2.1 RC1
Updated Instiki to Rails 2.1 RC1 (aka 2.0.991).
2008-05-17 23:22:34 -05:00

22 lines
536 B
Ruby

require '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