6873fc8026
Upgraded to Rails 2.0.2, except that we maintain vendor/rails/actionpack/lib/action_controller/routing.rb from Rail 1.2.6 (at least for now), so that Routes don't change. We still get to enjoy Rails's many new features. Also fixed a bug in Chunk-handling: disable WikiWord processing in tags (for real this time).
52 lines
1.1 KiB
Ruby
52 lines
1.1 KiB
Ruby
require "#{File.dirname(__FILE__)}/abstract_unit"
|
|
|
|
class DefaultDeliveryMethodMailer < ActionMailer::Base
|
|
end
|
|
|
|
class NonDefaultDeliveryMethodMailer < ActionMailer::Base
|
|
self.delivery_method = :sendmail
|
|
end
|
|
|
|
class ActionMailerBase_delivery_method_Test < Test::Unit::TestCase
|
|
def setup
|
|
set_delivery_method :smtp
|
|
end
|
|
|
|
def teardown
|
|
restore_delivery_method
|
|
end
|
|
|
|
def test_should_be_the_default_smtp
|
|
assert_equal :smtp, ActionMailer::Base.delivery_method
|
|
end
|
|
end
|
|
|
|
class DefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase
|
|
def setup
|
|
set_delivery_method :smtp
|
|
end
|
|
|
|
def teardown
|
|
restore_delivery_method
|
|
end
|
|
|
|
def test_should_be_the_default_smtp
|
|
assert_equal :smtp, DefaultDeliveryMethodMailer.delivery_method
|
|
end
|
|
end
|
|
|
|
class NonDefaultDeliveryMethodMailer_delivery_method_Test < Test::Unit::TestCase
|
|
def setup
|
|
set_delivery_method :smtp
|
|
end
|
|
|
|
def teardown
|
|
restore_delivery_method
|
|
end
|
|
|
|
def test_should_be_the_set_delivery_method
|
|
assert_equal :sendmail, NonDefaultDeliveryMethodMailer.delivery_method
|
|
end
|
|
end
|
|
|