Sha256: e69a31a27347c3814fb49db31fef1fb4527ef81be2984fed6ef9db86893ddb1b

Contents?: true

Size: 528 Bytes

Versions: 14

Compression:

Stored size: 528 Bytes

Contents

require "test_helper"

<% module_namespacing do -%>
class <%= class_name %>Test < ActionMailer::TestCase
<% actions.each do |action| -%>
  def test_<%= action %>
    mail = <%= class_name %>.<%= action %>
    assert_equal <%= action.to_s.humanize.inspect %>, mail.subject
    assert_equal ["to@example.org"], mail.to
    assert_equal ["from@example.com"], mail.from
    assert_match "Hi", mail.body.encoded
  end

<% end -%>
<% if actions.blank? -%>
  def test_sanity
    flunk "Need real tests"
  end
<% end -%>
end
<% end -%>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
minitest-rails-2.2.1 lib/generators/minitest/mailer/templates/mailer_test.rb
minitest-rails-2.2.0 lib/generators/minitest/mailer/templates/mailer_test.rb
minitest-rails-2.1.1 lib/generators/minitest/mailer/templates/mailer_test.rb
minitest-rails-2.1.0 lib/generators/minitest/mailer/templates/mailer_test.rb
minitest-rails-2.0.3 lib/generators/minitest/mailer/templates/mailer_test.rb
minitest-rails-2.0.2 lib/generators/minitest/mailer/templates/mailer_test.rb
minitest-rails-2.0.1 lib/generators/minitest/mailer/templates/mailer_test.rb
minitest-rails-2.0.0 lib/generators/minitest/mailer/templates/mailer_test.rb
minitest-rails-1.0.1 lib/generators/mini_test/mailer/templates/mailer_test.rb
minitest-rails-2.0.0.beta1 lib/generators/minitest/mailer/templates/mailer_test.rb
minitest-rails-1.0.0 lib/generators/mini_test/mailer/templates/mailer_test.rb
minitest-rails-1.0.0.beta3 lib/generators/mini_test/mailer/templates/mailer_test.rb
minitest-rails-1.0.0.beta2 lib/generators/mini_test/mailer/templates/mailer_test.rb
minitest-rails-1.0.0.beta1 lib/generators/mini_test/mailer/templates/mailer_test.rb