From 6a6367d7d207e54fced36b58a1abdd7ef0d36f82 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 3 Jan 2008 00:40:28 +0000 Subject: Fixed that you don't have to call super in ActionMailer::TestCase#setup (closes #10406) [jamesgolick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8536 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionmailer/test/test_helper_test.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'actionmailer/test') diff --git a/actionmailer/test/test_helper_test.rb b/actionmailer/test/test_helper_test.rb index eb17e3e803..d361e23a8e 100644 --- a/actionmailer/test/test_helper_test.rb +++ b/actionmailer/test/test_helper_test.rb @@ -115,3 +115,21 @@ class TestHelperMailerTest < ActionMailer::TestCase assert_match /0 .* but 1/, error.message end end + +class AnotherTestHelperMailerTest < ActionMailer::TestCase + + tests TestHelperMailer + + def setup + # Should not override ActionMailer setup methods + @test_var = "a value" + end + + def test_should_still_setup_mailer + assert @expected.is_a?(TMail::Mail) + end + + def test_should_run_overridden_setup_method + assert @test_var + end +end -- cgit v1.2.3