2016-08-06 13:03:39 -04:00
|
|
|
require "active_support/core_ext/kernel/reporting"
|
2010-08-22 17:43:31 -04:00
|
|
|
|
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
|
2017-01-11 03:48:00 -05:00
|
|
|
Encoding.default_internal = Encoding::UTF_8
|
|
|
|
Encoding.default_external = Encoding::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
|
2016-08-06 13:03:39 -04:00
|
|
|
File.expand_path("../", File.dirname(__FILE__))
|
2015-11-04 16:32:53 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-08-06 13:03:39 -04:00
|
|
|
require "active_support/testing/autorun"
|
|
|
|
require "active_support/testing/method_call_assertions"
|
|
|
|
require "action_mailer"
|
|
|
|
require "action_mailer/test_case"
|
2011-04-26 06:04:48 -04:00
|
|
|
|
2013-07-17 09:13:16 -04:00
|
|
|
# Emulate AV railtie
|
2016-08-06 13:03:39 -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
|
|
|
|
|
2016-08-06 13:03:39 -04:00
|
|
|
FIXTURE_LOAD_PATH = File.expand_path("fixtures", File.dirname(__FILE__))
|
2010-01-24 13:36:42 -05:00
|
|
|
ActionMailer::Base.view_paths = FIXTURE_LOAD_PATH
|
2012-09-10 15:52:19 -04:00
|
|
|
|
2015-08-20 01:57:49 -04:00
|
|
|
class ActiveSupport::TestCase
|
|
|
|
include ActiveSupport::Testing::MethodCallAssertions
|
2017-01-17 04:50:53 -05:00
|
|
|
|
|
|
|
# Skips the current run on Rubinius using Minitest::Assertions#skip
|
|
|
|
private def rubinius_skip(message = "")
|
|
|
|
skip message if RUBY_ENGINE == "rbx"
|
|
|
|
end
|
|
|
|
# Skips the current run on JRuby using Minitest::Assertions#skip
|
|
|
|
private def jruby_skip(message = "")
|
|
|
|
skip message if defined?(JRUBY_VERSION)
|
|
|
|
end
|
2015-08-20 01:57:49 -04:00
|
|
|
end
|