From 57cde631383a8a0fa8d231ac1ae85ea725e12cd5 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 7 Nov 2007 16:05:17 +0000 Subject: Allow ActionMailer subclasses to individually set their delivery method (so two subclasses can have different delivery methods) (closes #10033) [zdennis] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8111 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionmailer/test/mail_helper_test.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'actionmailer/test/mail_helper_test.rb') diff --git a/actionmailer/test/mail_helper_test.rb b/actionmailer/test/mail_helper_test.rb index 344dcd7c49..70e5cb81d5 100644 --- a/actionmailer/test/mail_helper_test.rb +++ b/actionmailer/test/mail_helper_test.rb @@ -60,13 +60,17 @@ class MailerHelperTest < Test::Unit::TestCase end def setup - ActionMailer::Base.delivery_method = :test + set_delivery_method :test ActionMailer::Base.perform_deliveries = true ActionMailer::Base.deliveries = [] @recipient = 'test@localhost' end - + + def teardown + restore_delivery_method + end + def test_use_helper mail = HelperMailer.create_use_helper(@recipient) assert_match %r{Mr. Joe Person}, mail.encoded -- cgit v1.2.3