From 05b9382e292d8b5aeee00304876c1f4e9fc87de5 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Thu, 4 Mar 2010 01:12:16 -0800 Subject: Update the ActionMailer tests to run off of the latest ActionController config refactor --- actionmailer/test/old_base/asset_host_test.rb | 9 ++++----- actionmailer/test/old_base/url_test.rb | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/actionmailer/test/old_base/asset_host_test.rb b/actionmailer/test/old_base/asset_host_test.rb index 36f0afcfd6..75fe2a6168 100644 --- a/actionmailer/test/old_base/asset_host_test.rb +++ b/actionmailer/test/old_base/asset_host_test.rb @@ -14,6 +14,10 @@ class AssetHostTest < Test::Unit::TestCase set_delivery_method :test ActionMailer::Base.perform_deliveries = true ActionMailer::Base.deliveries.clear + AssetHostMailer.configure do |c| + c.asset_host = "http://www.example.com" + c.assets_dir = '' + end end def teardown @@ -21,11 +25,6 @@ class AssetHostTest < Test::Unit::TestCase end def test_asset_host_as_string - ActionMailer::Base.configure do |c| - c.asset_host = "http://www.example.com" - c.assets_dir = File.dirname(__FILE__) - end - mail = AssetHostMailer.email_with_asset assert_equal "\"Somelogo\"", mail.body.to_s.strip end diff --git a/actionmailer/test/old_base/url_test.rb b/actionmailer/test/old_base/url_test.rb index a719248599..60740d6b0b 100644 --- a/actionmailer/test/old_base/url_test.rb +++ b/actionmailer/test/old_base/url_test.rb @@ -13,6 +13,10 @@ end class TestMailer < ActionMailer::Base default_url_options[:host] = 'www.basecamphq.com' + configure do |c| + c.assets_dir = '' # To get the tests to pass + end + def signed_up_with_url(recipient) @recipients = recipient @subject = "[Signed up] Welcome #{recipient}" -- cgit v1.2.3