diff options
Diffstat (limited to 'actionmailer/test/abstract_unit.rb')
-rw-r--r-- | actionmailer/test/abstract_unit.rb | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index 15729bafba..93d16f491d 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 } @@ -60,4 +63,11 @@ def restore_delivery_method ActionMailer::Base.delivery_method = @old_delivery_method end -ActiveSupport::Deprecation.silenced = true +# Skips the current run on Rubinius using Minitest::Assertions#skip +def rubinius_skip(message = '') + skip message if RUBY_ENGINE == 'rbx' +end +# Skips the current run on JRuby using Minitest::Assertions#skip +def jruby_skip(message = '') + skip message if defined?(JRUBY_VERSION) +end |