Skip to content
Browse files

Update the ActionMailer tests to run off of the latest ActionControll…

…er config refactor
  • Loading branch information...
1 parent ad2e6ee commit 05b9382e292d8b5aeee00304876c1f4e9fc87de5 Carl Lerche committed
Showing with 8 additions and 5 deletions.
  1. +4 −5 actionmailer/test/old_base/asset_host_test.rb
  2. +4 −0 actionmailer/test/old_base/url_test.rb
View
9 actionmailer/test/old_base/asset_host_test.rb
@@ -14,6 +14,10 @@ def setup
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 @@ def teardown
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
View
4 actionmailer/test/old_base/url_test.rb
@@ -13,6 +13,10 @@ class ActionMailer::Base
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}"

0 comments on commit 05b9382

Please sign in to comment.
Something went wrong with that request. Please try again.