1 require "#{File.dirname(__FILE__)}/abstract_unit"
3 class DefaultDeliveryMethodMailer < ActionMailer::Base
6 class NonDefaultDeliveryMethodMailer < ActionMailer::Base
7 self.delivery_method = :sendmail
10 class ActionMailerBase_delivery_method_Test < Test::Unit::TestCase
12 set_delivery_method :smtp
16 restore_delivery_method
19 def test_should_be_the_default_smtp
20 assert_equal :smtp, ActionMailer::Base.delivery_method
24 class DefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase
26 set_delivery_method :smtp
30 restore_delivery_method
33 def test_should_be_the_default_smtp
34 assert_equal :smtp, DefaultDeliveryMethodMailer.delivery_method
38 class NonDefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase
40 set_delivery_method :smtp
44 restore_delivery_method
47 def test_should_be_the_set_delivery_method
48 assert_equal :sendmail, NonDefaultDeliveryMethodMailer.delivery_method