aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-03-04 01:12:16 -0800
committerCarl Lerche <carllerche@mac.com>2010-03-04 01:12:16 -0800
commit05b9382e292d8b5aeee00304876c1f4e9fc87de5 (patch)
tree29941f120c1614be2df6aa5a958814417b25cd68 /actionmailer
parentad2e6ee4ec5cc6c6bc5f11bfb875e582dbe55468 (diff)
downloadrails-05b9382e292d8b5aeee00304876c1f4e9fc87de5.tar.gz
rails-05b9382e292d8b5aeee00304876c1f4e9fc87de5.tar.bz2
rails-05b9382e292d8b5aeee00304876c1f4e9fc87de5.zip
Update the ActionMailer tests to run off of the latest ActionController config refactor
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/test/old_base/asset_host_test.rb9
-rw-r--r--actionmailer/test/old_base/url_test.rb4
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 "<img alt=\"Somelogo\" src=\"http://www.example.com/images/somelogo.png\" />", 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}"