aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/abstract_unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/test/abstract_unit.rb')
-rw-r--r--actionmailer/test/abstract_unit.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb
index 15729bafba..cf790c7487 100644
--- a/actionmailer/test/abstract_unit.rb
+++ b/actionmailer/test/abstract_unit.rb
@@ -11,15 +11,18 @@ end
require 'active_support/testing/autorun'
require 'action_mailer'
require 'action_mailer/test_case'
+require 'mail'
-silence_warnings do
- # These external dependencies have warnings :/
- require 'mail'
-end
+# Emulate AV railtie
+require 'action_view'
+ActionMailer::Base.send(:include, ActionView::Layouts)
# Show backtraces for deprecated behavior for quicker cleanup.
ActiveSupport::Deprecation.debug = true
+# Disable available locale checks to avoid warnings running the test suite.
+I18n.enforce_available_locales = false
+
# Bogus template processors
ActionView::Template.register_template_handler :haml, lambda { |template| "Look its HAML!".inspect }
ActionView::Template.register_template_handler :bak, lambda { |template| "Lame backup".inspect }
@@ -59,5 +62,3 @@ end
def restore_delivery_method
ActionMailer::Base.delivery_method = @old_delivery_method
end
-
-ActiveSupport::Deprecation.silenced = true