From 2a25c4ce6da6ea23ebdf44e7eb2d2441dbea20a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Strza=C5=82kowski?= Date: Wed, 17 Jul 2013 15:08:10 +0200 Subject: Do not silance mail gem warnings. I doesn't have any at the moment --- actionmailer/test/abstract_unit.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'actionmailer/test') diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index ed8cf72cd0..bfa1302d79 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -11,11 +11,7 @@ end require 'active_support/testing/autorun' require 'action_mailer' require 'action_mailer/test_case' - -silence_warnings do - # These external dependencies have warnings :/ - require 'mail' -end +require 'mail' # Show backtraces for deprecated behavior for quicker cleanup. ActiveSupport::Deprecation.debug = true -- cgit v1.2.3 From d1760253f5a5c26b8b1d0f38f4f288d759fbb306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Strza=C5=82kowski?= Date: Wed, 17 Jul 2013 15:13:16 +0200 Subject: Load AV::Layout to AM::Base in railties --- actionmailer/test/abstract_unit.rb | 3 +++ actionmailer/test/i18n_with_controller_test.rb | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'actionmailer/test') diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index bfa1302d79..1890853952 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -13,6 +13,9 @@ require 'action_mailer' require 'action_mailer/test_case' require 'mail' +# Emulate AV railtie +ActionMailer::Base.send(:include, ActionView::Layouts) + # Show backtraces for deprecated behavior for quicker cleanup. ActiveSupport::Deprecation.debug = true diff --git a/actionmailer/test/i18n_with_controller_test.rb b/actionmailer/test/i18n_with_controller_test.rb index a3e93c9c31..ab5eaaa9d5 100644 --- a/actionmailer/test/i18n_with_controller_test.rb +++ b/actionmailer/test/i18n_with_controller_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'action_view' require 'action_controller' class I18nTestMailer < ActionMailer::Base @@ -14,6 +15,9 @@ class I18nTestMailer < ActionMailer::Base end end +# Emulate AV railtie +ActionController::Base.superclass.send(:include, ActionView::Layouts) + class TestController < ActionController::Base def send_mail I18nTestMailer.mail_with_i18n_subject("test@localhost").deliver -- cgit v1.2.3 From e868441896b17ec1ae1a3b7640ff8b302c31a983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Strza=C5=82kowski?= Date: Tue, 30 Jul 2013 00:50:24 +0200 Subject: Remove hard require to ActionView from ActionMailer --- actionmailer/test/abstract_unit.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionmailer/test') diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index 1890853952..aa18c512c7 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -14,6 +14,7 @@ require 'action_mailer/test_case' require 'mail' # Emulate AV railtie +require 'action_view' ActionMailer::Base.send(:include, ActionView::Layouts) # Show backtraces for deprecated behavior for quicker cleanup. -- cgit v1.2.3