From eec2d301d4ce9df9c71c1a5aa63053eb970b6818 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 15 Feb 2010 10:20:11 -0600 Subject: Fix test load paths for those not using bundler --- actionmailer/test/abstract_unit.rb | 7 +++++-- actionmailer/test/subscriber_test.rb | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'actionmailer/test') diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index f6baa4a9e8..9d3c9086c9 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -1,4 +1,7 @@ -require File.expand_path('../../../load_paths', __FILE__) +require File.expand_path('../../../bundler', __FILE__) + +lib = File.expand_path("#{File.dirname(__FILE__)}/../lib") +$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib) require 'test/unit' require 'action_mailer' @@ -14,7 +17,7 @@ ActionView::Template.register_template_handler :bak, lambda { |template| "Lame b FIXTURE_LOAD_PATH = File.expand_path('fixtures', File.dirname(__FILE__)) ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH -class MockSMTP +class MockSMTP def self.deliveries @@deliveries end diff --git a/actionmailer/test/subscriber_test.rb b/actionmailer/test/subscriber_test.rb index 3d1736d64f..88a5d2ca34 100644 --- a/actionmailer/test/subscriber_test.rb +++ b/actionmailer/test/subscriber_test.rb @@ -1,3 +1,6 @@ +railties_path = File.expand_path('../../../railties/lib', __FILE__) +$:.unshift(railties_path) if File.directory?(railties_path) && !$:.include?(railties_path) + require "abstract_unit" require "rails/subscriber/test_helper" require "action_mailer/railties/subscriber" -- cgit v1.2.3 From f0523f72b46db14e2f50c8347a8708734c650f84 Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Mon, 15 Feb 2010 21:44:30 +0700 Subject: Rename Rails::Subscriber to Rails::LogSubscriber --- actionmailer/test/log_subscriber_test.rb | 44 ++++++++++++++++++++++++++++++++ actionmailer/test/subscriber_test.rb | 44 -------------------------------- 2 files changed, 44 insertions(+), 44 deletions(-) create mode 100644 actionmailer/test/log_subscriber_test.rb delete mode 100644 actionmailer/test/subscriber_test.rb (limited to 'actionmailer/test') diff --git a/actionmailer/test/log_subscriber_test.rb b/actionmailer/test/log_subscriber_test.rb new file mode 100644 index 0000000000..edd7c84d29 --- /dev/null +++ b/actionmailer/test/log_subscriber_test.rb @@ -0,0 +1,44 @@ +require "abstract_unit" +require "rails/log_subscriber/test_helper" +require "action_mailer/railties/log_subscriber" + +class AMLogSubscriberTest < ActionMailer::TestCase + include Rails::LogSubscriber::TestHelper + Rails::LogSubscriber.add(:action_mailer, ActionMailer::Railties::LogSubscriber.new) + + class TestMailer < ActionMailer::Base + def basic + recipients "somewhere@example.com" + subject "basic" + from "basic@example.com" + body "Hello world" + end + + def receive(mail) + # Do nothing + end + end + + def set_logger(logger) + ActionMailer::Base.logger = logger + end + + def test_deliver_is_notified + TestMailer.basic.deliver + wait + assert_equal(1, @logger.logged(:info).size) + assert_match(/Sent mail to somewhere@example.com/, @logger.logged(:info).first) + assert_equal(1, @logger.logged(:debug).size) + assert_match(/Hello world/, @logger.logged(:debug).first) + end + + def test_receive_is_notified + fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email") + TestMailer.receive(fixture) + wait + assert_equal(1, @logger.logged(:info).size) + assert_match(/Received mail/, @logger.logged(:info).first) + assert_equal(1, @logger.logged(:debug).size) + assert_match(/Jamis/, @logger.logged(:debug).first) + end +end \ No newline at end of file diff --git a/actionmailer/test/subscriber_test.rb b/actionmailer/test/subscriber_test.rb deleted file mode 100644 index 3d1736d64f..0000000000 --- a/actionmailer/test/subscriber_test.rb +++ /dev/null @@ -1,44 +0,0 @@ -require "abstract_unit" -require "rails/subscriber/test_helper" -require "action_mailer/railties/subscriber" - -class AMSubscriberTest < ActionMailer::TestCase - include Rails::Subscriber::TestHelper - Rails::Subscriber.add(:action_mailer, ActionMailer::Railties::Subscriber.new) - - class TestMailer < ActionMailer::Base - def basic - recipients "somewhere@example.com" - subject "basic" - from "basic@example.com" - body "Hello world" - end - - def receive(mail) - # Do nothing - end - end - - def set_logger(logger) - ActionMailer::Base.logger = logger - end - - def test_deliver_is_notified - TestMailer.basic.deliver - wait - assert_equal(1, @logger.logged(:info).size) - assert_match(/Sent mail to somewhere@example.com/, @logger.logged(:info).first) - assert_equal(1, @logger.logged(:debug).size) - assert_match(/Hello world/, @logger.logged(:debug).first) - end - - def test_receive_is_notified - fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email") - TestMailer.receive(fixture) - wait - assert_equal(1, @logger.logged(:info).size) - assert_match(/Received mail/, @logger.logged(:info).first) - assert_equal(1, @logger.logged(:debug).size) - assert_match(/Jamis/, @logger.logged(:debug).first) - end -end \ No newline at end of file -- cgit v1.2.3 From be35a1510d065fc8575524e1b6b9f2bebd3e138c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 19 Feb 2010 10:51:17 +0100 Subject: Allow to choose the template path and template name used in implicit rendering with ActionMailer. --- actionmailer/test/base_test.rb | 57 ++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 21 deletions(-) (limited to 'actionmailer/test') diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 222db66aaa..5fc229df09 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -14,8 +14,13 @@ class BaseTest < ActiveSupport::TestCase mail({:subject => "The first email on new API!"}.merge!(hash)) end - def simple(hash = {}) - mail(hash) + def welcome_with_headers(hash = {}) + headers hash + mail + end + + def welcome_from_another_path(path) + mail(:template_name => "welcome", :template_path => path) end def html_only(hash = {}) @@ -25,11 +30,6 @@ class BaseTest < ActiveSupport::TestCase def plain_text_only(hash = {}) mail(hash) end - - def simple_with_headers(hash = {}) - headers hash - mail - end def attachment_with_content(hash = {}) attachments['invoice.pdf'] = 'This is test File content' @@ -78,8 +78,12 @@ class BaseTest < ActiveSupport::TestCase format.html{ render "welcome" } if include_html end end - - def different_template(template_name='') + + def implicit_different_template(template_name='') + mail(:template_name => template_name) + end + + def explicit_different_template(template_name='') mail do |format| format.text { render :template => "#{mailer_name}/#{template_name}" } format.html { render :template => "#{mailer_name}/#{template_name}" } @@ -88,13 +92,10 @@ class BaseTest < ActiveSupport::TestCase def different_layout(layout_name='') mail do |format| - format.text { - render :layout => layout_name - } + format.text { render :layout => layout_name } format.html { render :layout => layout_name } end end - end test "method call to mail does not raise error" do @@ -154,7 +155,7 @@ class BaseTest < ActiveSupport::TestCase test "can pass random headers in as a hash to mail" do hash = {'X-Special-Domain-Specific-Header' => "SecretValue", 'In-Reply-To' => '1234@mikel.me.com' } - mail = BaseMailer.simple(hash) + mail = BaseMailer.welcome(hash) assert_equal('SecretValue', mail['X-Special-Domain-Specific-Header'].decoded) assert_equal('1234@mikel.me.com', mail['In-Reply-To'].decoded) end @@ -162,7 +163,7 @@ class BaseTest < ActiveSupport::TestCase test "can pass random headers in as a hash" do hash = {'X-Special-Domain-Specific-Header' => "SecretValue", 'In-Reply-To' => '1234@mikel.me.com' } - mail = BaseMailer.simple_with_headers(hash) + mail = BaseMailer.welcome_with_headers(hash) assert_equal('SecretValue', mail['X-Special-Domain-Specific-Header'].decoded) assert_equal('1234@mikel.me.com', mail['In-Reply-To'].decoded) end @@ -247,9 +248,9 @@ class BaseTest < ActiveSupport::TestCase end test "uses random default headers from class" do - with_default BaseMailer, "X-SPAM" => "Not spam" do - email = BaseMailer.simple - assert_equal("Not spam", email["X-SPAM"].decoded) + with_default BaseMailer, "X-Custom" => "Custom" do + email = BaseMailer.welcome + assert_equal("Custom", email["X-Custom"].decoded) end end @@ -476,18 +477,32 @@ class BaseTest < ActiveSupport::TestCase end # Rendering - test "that you can specify a different template" do - mail = BaseMailer.different_template('explicit_multipart_templates') + test "you can specify a different template for implicit render" do + mail = BaseMailer.implicit_different_template('implicit_multipart') + assert_equal("HTML Implicit Multipart", mail.html_part.body.decoded) + assert_equal("TEXT Implicit Multipart", mail.text_part.body.decoded) + end + + test "you can specify a different template for explicit render" do + mail = BaseMailer.explicit_different_template('explicit_multipart_templates') assert_equal("HTML Explicit Multipart Templates", mail.html_part.body.decoded) assert_equal("TEXT Explicit Multipart Templates", mail.text_part.body.decoded) end - test "that you can specify a different layout" do + test "you can specify a different layout" do mail = BaseMailer.different_layout('different_layout') assert_equal("HTML -- HTML", mail.html_part.body.decoded) assert_equal("PLAIN -- PLAIN", mail.text_part.body.decoded) end + test "you can specify the template path for implicit lookup" do + mail = BaseMailer.welcome_from_another_path('another.path/base_mailer') + assert_equal("Welcome from another path", mail.body.encoded) + + mail = BaseMailer.welcome_from_another_path(['unknown/invalid', 'another.path/base_mailer']) + assert_equal("Welcome from another path", mail.body.encoded) + end + protected # Execute the block setting the given values and restoring old values after -- cgit v1.2.3 From 6bc24d40d56332593bc22612d4618a2f80b1d91b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sch=C3=BCrrer?= Date: Sun, 21 Feb 2010 17:21:25 +0100 Subject: Use ActionDispatch::Routing everywhere --- actionmailer/test/old_base/url_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer/test') diff --git a/actionmailer/test/old_base/url_test.rb b/actionmailer/test/old_base/url_test.rb index d851431c7a..53664480ff 100644 --- a/actionmailer/test/old_base/url_test.rb +++ b/actionmailer/test/old_base/url_test.rb @@ -61,7 +61,7 @@ class ActionMailerUrlTest < Test::Unit::TestCase def test_signed_up_with_url TestMailer.delivery_method = :test - ActionController::Routing::Routes.draw do |map| + ActionDispatch::Routing::Routes.draw do |map| map.connect ':controller/:action/:id' map.welcome 'welcome', :controller=>"foo", :action=>"bar" end -- cgit v1.2.3 From cefc136ec332e5e065a2f4dd184d6fec0ea3c2ba Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Mon, 22 Feb 2010 12:17:08 +1100 Subject: Adding options to register observers and interceptors through ActionMailer::Base.register_observer and ActionMailer::Base.register_interceptor. These hook into Mail.register_interceptor and Mail.register_observer. Also bumped Mail requirement to 2.1.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionmailer/test/base_test.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'actionmailer/test') diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 5fc229df09..c1cf1f0157 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -502,6 +502,32 @@ class BaseTest < ActiveSupport::TestCase mail = BaseMailer.welcome_from_another_path(['unknown/invalid', 'another.path/base_mailer']) assert_equal("Welcome from another path", mail.body.encoded) end + + # Before and After hooks + + class MyObserver + def self.delivered_email(mail) + end + end + + test "you can register an observer to the mail object that gets informed on email delivery" do + ActionMailer::Base.register_observer(MyObserver) + mail = BaseMailer.welcome + MyObserver.expects(:delivered_email).with(mail) + mail.deliver + end + + class MyInterceptor + def self.delivering_email(mail) + end + end + + test "you can register an interceptor to the mail object that gets passed the mail object before delivery" do + ActionMailer::Base.register_interceptor(MyInterceptor) + mail = BaseMailer.welcome + MyInterceptor.expects(:delivering_email).with(mail) + mail.deliver + end protected -- cgit v1.2.3 From 24ab5665b2f12a589e96a4b742cc49c08bf0e9df Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Tue, 23 Feb 2010 17:31:17 -0800 Subject: Revert "Fix test load paths for those not using bundler" This reverts commit eec2d301d4ce9df9c71c1a5aa63053eb970b6818. This commit broke tests. You cannot have a file called "bundler" on the load path. --- actionmailer/test/abstract_unit.rb | 7 ++----- actionmailer/test/log_subscriber_test.rb | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'actionmailer/test') diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index 9d3c9086c9..f6baa4a9e8 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -1,7 +1,4 @@ -require File.expand_path('../../../bundler', __FILE__) - -lib = File.expand_path("#{File.dirname(__FILE__)}/../lib") -$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib) +require File.expand_path('../../../load_paths', __FILE__) require 'test/unit' require 'action_mailer' @@ -17,7 +14,7 @@ ActionView::Template.register_template_handler :bak, lambda { |template| "Lame b FIXTURE_LOAD_PATH = File.expand_path('fixtures', File.dirname(__FILE__)) ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH -class MockSMTP +class MockSMTP def self.deliveries @@deliveries end diff --git a/actionmailer/test/log_subscriber_test.rb b/actionmailer/test/log_subscriber_test.rb index 57b4a6a7f0..edd7c84d29 100644 --- a/actionmailer/test/log_subscriber_test.rb +++ b/actionmailer/test/log_subscriber_test.rb @@ -1,6 +1,3 @@ -railties_path = File.expand_path('../../../railties/lib', __FILE__) -$:.unshift(railties_path) if File.directory?(railties_path) && !$:.include?(railties_path) - require "abstract_unit" require "rails/log_subscriber/test_helper" require "action_mailer/railties/log_subscriber" -- cgit v1.2.3 From 1fb2c6f63527408c8dbb00d6483ee6cf677db2df Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Wed, 24 Feb 2010 16:21:21 -0800 Subject: Get ActionMailer's tests passing with the non global router --- actionmailer/test/old_base/url_test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'actionmailer/test') diff --git a/actionmailer/test/old_base/url_test.rb b/actionmailer/test/old_base/url_test.rb index 53664480ff..0e8917b427 100644 --- a/actionmailer/test/old_base/url_test.rb +++ b/actionmailer/test/old_base/url_test.rb @@ -4,8 +4,10 @@ require 'action_controller' class WelcomeController < ActionController::Base end +AppRoutes = ActionDispatch::Routing::RouteSet.new + class ActionMailer::Base - include ActionController::UrlFor + include AppRoutes.named_url_helpers end class TestMailer < ActionMailer::Base @@ -61,7 +63,7 @@ class ActionMailerUrlTest < Test::Unit::TestCase def test_signed_up_with_url TestMailer.delivery_method = :test - ActionDispatch::Routing::Routes.draw do |map| + AppRoutes.draw do |map| map.connect ':controller/:action/:id' map.welcome 'welcome', :controller=>"foo", :action=>"bar" end -- cgit v1.2.3 From 98f77e08278658ec47c9eb2e8f819d781c1eaebf Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Fri, 26 Feb 2010 15:00:33 -0800 Subject: Rename named_url_helpers to url_helpers and url_helpers to url_for --- actionmailer/test/old_base/url_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer/test') diff --git a/actionmailer/test/old_base/url_test.rb b/actionmailer/test/old_base/url_test.rb index 0e8917b427..a719248599 100644 --- a/actionmailer/test/old_base/url_test.rb +++ b/actionmailer/test/old_base/url_test.rb @@ -7,7 +7,7 @@ end AppRoutes = ActionDispatch::Routing::RouteSet.new class ActionMailer::Base - include AppRoutes.named_url_helpers + include AppRoutes.url_helpers end class TestMailer < ActionMailer::Base -- cgit v1.2.3 From f0fe555d842e7b81b323ed3acfd551f0659c5faa Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sun, 28 Feb 2010 18:18:21 -0600 Subject: fix up actionmailer load path --- actionmailer/test/abstract_unit.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionmailer/test') diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index f6baa4a9e8..16fef3a9a4 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -1,5 +1,8 @@ require File.expand_path('../../../load_paths', __FILE__) +lib = File.expand_path("#{File.dirname(__FILE__)}/../lib") +$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib) + require 'test/unit' require 'action_mailer' require 'action_mailer/test_case' @@ -14,7 +17,7 @@ ActionView::Template.register_template_handler :bak, lambda { |template| "Lame b FIXTURE_LOAD_PATH = File.expand_path('fixtures', File.dirname(__FILE__)) ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH -class MockSMTP +class MockSMTP def self.deliveries @@deliveries end -- cgit v1.2.3 From 05f27761a23f3e939f35e4fb2d3c40f150dee49b Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 2 Mar 2010 22:55:09 -0800 Subject: Fix action_mailer tests --- actionmailer/test/log_subscriber_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'actionmailer/test') diff --git a/actionmailer/test/log_subscriber_test.rb b/actionmailer/test/log_subscriber_test.rb index edd7c84d29..c08c34b4a2 100644 --- a/actionmailer/test/log_subscriber_test.rb +++ b/actionmailer/test/log_subscriber_test.rb @@ -4,7 +4,11 @@ require "action_mailer/railties/log_subscriber" class AMLogSubscriberTest < ActionMailer::TestCase include Rails::LogSubscriber::TestHelper - Rails::LogSubscriber.add(:action_mailer, ActionMailer::Railties::LogSubscriber.new) + + def setup + super + Rails::LogSubscriber.add(:action_mailer, ActionMailer::Railties::LogSubscriber.new) + end class TestMailer < ActionMailer::Base def basic -- cgit v1.2.3 From ad2e6ee4ec5cc6c6bc5f11bfb875e582dbe55468 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Thu, 4 Mar 2010 01:01:21 -0800 Subject: Fix a bunch of failing AP / AM specs created from the previous AbstractController configuration refactor. --- actionmailer/test/old_base/asset_host_test.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'actionmailer/test') diff --git a/actionmailer/test/old_base/asset_host_test.rb b/actionmailer/test/old_base/asset_host_test.rb index aa9cfd88dd..36f0afcfd6 100644 --- a/actionmailer/test/old_base/asset_host_test.rb +++ b/actionmailer/test/old_base/asset_host_test.rb @@ -21,13 +21,17 @@ class AssetHostTest < Test::Unit::TestCase end def test_asset_host_as_string - ActionController::Base.asset_host = "http://www.example.com" + 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 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 -- cgit v1.2.3 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(-) (limited to 'actionmailer/test') 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 From 46bf2f04a87c56826963958eaf370d9262526af0 Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Thu, 4 Mar 2010 17:44:16 -0800 Subject: Fixed a broken AM test. I'm unsure how this passed before. --- actionmailer/test/old_base/asset_host_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer/test') diff --git a/actionmailer/test/old_base/asset_host_test.rb b/actionmailer/test/old_base/asset_host_test.rb index 75fe2a6168..0ec0242f55 100644 --- a/actionmailer/test/old_base/asset_host_test.rb +++ b/actionmailer/test/old_base/asset_host_test.rb @@ -42,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 -- cgit v1.2.3