diff options
author | wycats <wycats@gmail.com> | 2010-03-26 15:10:24 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-26 15:10:24 -0700 |
commit | 197904341f2b2f21d69c653cede3aec124e86720 (patch) | |
tree | 83f1234e238016126860a929594db22e1862d783 /actionmailer/test/old_base/url_test.rb | |
parent | 76d2c455c0607b4cd5f238cadef8f933a18567fb (diff) | |
parent | b3a0aed028835ce4551c4a76742744a40a71b0be (diff) | |
download | rails-197904341f2b2f21d69c653cede3aec124e86720.tar.gz rails-197904341f2b2f21d69c653cede3aec124e86720.tar.bz2 rails-197904341f2b2f21d69c653cede3aec124e86720.zip |
Merge branch 'master' into docrails
Diffstat (limited to 'actionmailer/test/old_base/url_test.rb')
-rw-r--r-- | actionmailer/test/old_base/url_test.rb | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/actionmailer/test/old_base/url_test.rb b/actionmailer/test/old_base/url_test.rb index 60740d6b0b..17b383cc2a 100644 --- a/actionmailer/test/old_base/url_test.rb +++ b/actionmailer/test/old_base/url_test.rb @@ -10,7 +10,7 @@ class ActionMailer::Base include AppRoutes.url_helpers end -class TestMailer < ActionMailer::Base +class UrlTestMailer < ActionMailer::Base default_url_options[:host] = 'www.basecamphq.com' configure do |c| @@ -26,14 +26,6 @@ class TestMailer < ActionMailer::Base @recipient = recipient @welcome_url = url_for :host => "example.com", :controller => "welcome", :action => "greeting" end - - class <<self - attr_accessor :received_body - end - - def receive(mail) - self.class.received_body = mail.body - end end class ActionMailerUrlTest < Test::Unit::TestCase @@ -65,7 +57,7 @@ class ActionMailerUrlTest < Test::Unit::TestCase end def test_signed_up_with_url - TestMailer.delivery_method = :test + UrlTestMailer.delivery_method = :test AppRoutes.draw do |map| map.connect ':controller/:action/:id' @@ -80,14 +72,14 @@ class ActionMailerUrlTest < Test::Unit::TestCase expected.date = Time.local(2004, 12, 12) created = nil - assert_nothing_raised { created = TestMailer.signed_up_with_url(@recipient) } + assert_nothing_raised { created = UrlTestMailer.signed_up_with_url(@recipient) } assert_not_nil created expected.message_id = '<123@456>' created.message_id = '<123@456>' assert_equal expected.encoded, created.encoded - assert_nothing_raised { TestMailer.signed_up_with_url(@recipient).deliver } + assert_nothing_raised { UrlTestMailer.signed_up_with_url(@recipient).deliver } assert_not_nil ActionMailer::Base.deliveries.first delivered = ActionMailer::Base.deliveries.first |