2010-08-22 17:43:31 -04:00
|
|
|
require 'active_support/core_ext/kernel/reporting'
|
|
|
|
|
2011-12-24 07:57:54 -05:00
|
|
|
# These are the normal settings that will be set up by Railties
|
|
|
|
# TODO: Have these tests support other combinations of these values
|
|
|
|
silence_warnings do
|
|
|
|
Encoding.default_internal = "UTF-8"
|
|
|
|
Encoding.default_external = "UTF-8"
|
2010-08-21 21:53:04 -04:00
|
|
|
end
|
2010-03-17 02:24:00 -04:00
|
|
|
|
2015-11-04 16:32:53 -05:00
|
|
|
module Rails
|
|
|
|
def self.root
|
|
|
|
File.expand_path('../', File.dirname(__FILE__))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-12-28 14:17:37 -05:00
|
|
|
require 'active_support/testing/autorun'
|
2015-08-20 01:57:49 -04:00
|
|
|
require 'active_support/testing/method_call_assertions'
|
2006-07-03 17:14:04 -04:00
|
|
|
require 'action_mailer'
|
2010-02-01 17:34:23 -05:00
|
|
|
require 'action_mailer/test_case'
|
2011-04-26 06:04:48 -04:00
|
|
|
|
2013-07-17 09:13:16 -04:00
|
|
|
# Emulate AV railtie
|
2013-07-29 18:50:24 -04:00
|
|
|
require 'action_view'
|
2015-01-31 23:12:37 -05:00
|
|
|
ActionMailer::Base.include(ActionView::Layouts)
|
2013-07-17 09:13:16 -04:00
|
|
|
|
2006-09-03 23:38:13 -04:00
|
|
|
# Show backtraces for deprecated behavior for quicker cleanup.
|
|
|
|
ActiveSupport::Deprecation.debug = true
|
|
|
|
|
2013-12-16 13:04:07 -05:00
|
|
|
# Disable available locale checks to avoid warnings running the test suite.
|
|
|
|
I18n.enforce_available_locales = false
|
|
|
|
|
2010-01-24 13:36:42 -05:00
|
|
|
FIXTURE_LOAD_PATH = File.expand_path('fixtures', File.dirname(__FILE__))
|
|
|
|
ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH
|
2012-09-10 15:52:19 -04:00
|
|
|
|
2014-01-13 06:24:06 -05:00
|
|
|
# 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
|
2014-07-19 16:35:12 -04:00
|
|
|
|
2015-08-20 01:57:49 -04:00
|
|
|
class ActiveSupport::TestCase
|
|
|
|
include ActiveSupport::Testing::MethodCallAssertions
|
|
|
|
end
|