diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-03-12 16:00:01 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-03-12 16:00:01 +0000 |
commit | e68bfaf1fe1a7890a67af6f444281185f507cf9e (patch) | |
tree | 5e73caccdcdd65d0ac97f9eb92195928f30925f2 /actionmailer/test/old_base/asset_host_test.rb | |
parent | ef6462c73003b28c8e060a06120abb9cd67b6d52 (diff) | |
parent | 16846553b8866eab2aa3b128a2a23a221a25f7e3 (diff) | |
download | rails-e68bfaf1fe1a7890a67af6f444281185f507cf9e.tar.gz rails-e68bfaf1fe1a7890a67af6f444281185f507cf9e.tar.bz2 rails-e68bfaf1fe1a7890a67af6f444281185f507cf9e.zip |
Merge remote branch 'mainstream/master'
Conflicts:
activerecord/lib/active_record/base.rb
railties/lib/rails/configuration.rb
railties/lib/rails/log_subscriber.rb
Diffstat (limited to 'actionmailer/test/old_base/asset_host_test.rb')
-rw-r--r-- | actionmailer/test/old_base/asset_host_test.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actionmailer/test/old_base/asset_host_test.rb b/actionmailer/test/old_base/asset_host_test.rb index aa9cfd88dd..0ec0242f55 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,13 +25,12 @@ class AssetHostTest < Test::Unit::TestCase end def test_asset_host_as_string - ActionController::Base.asset_host = "http://www.example.com" mail = AssetHostMailer.email_with_asset assert_equal "<img alt=\"Somelogo\" src=\"http://www.example.com/images/somelogo.png\" />", mail.body.to_s.strip end def test_asset_host_as_one_arguement_proc - ActionController::Base.asset_host = Proc.new { |source| + AssetHostMailer.config.asset_host = Proc.new { |source| if source.starts_with?('/images') "http://images.example.com" else @@ -39,7 +42,7 @@ class AssetHostTest < Test::Unit::TestCase end def test_asset_host_as_two_arguement_proc - ActionController::Base.asset_host = Proc.new {|source,request| + ActionController::Base.config.asset_host = Proc.new {|source,request| if request && request.ssl? "https://www.example.com" else |