2017-07-09 12:06:36 +00:00
|
|
|
# frozen_string_literal: true
|
2017-07-10 13:39:13 +00:00
|
|
|
|
2010-06-21 17:02:04 +00:00
|
|
|
ORIG_ARGV = ARGV.dup
|
|
|
|
|
2016-08-06 16:03:25 +00:00
|
|
|
require "active_support/core_ext/kernel/reporting"
|
2011-12-20 17:22:21 +00:00
|
|
|
|
|
|
|
silence_warnings do
|
2017-01-11 08:48:00 +00:00
|
|
|
Encoding.default_internal = Encoding::UTF_8
|
|
|
|
Encoding.default_external = Encoding::UTF_8
|
2010-08-22 05:23:13 +00:00
|
|
|
end
|
|
|
|
|
2016-08-06 16:03:25 +00:00
|
|
|
require "active_support/testing/autorun"
|
|
|
|
require "active_support/testing/method_call_assertions"
|
2010-03-17 07:53:48 +00:00
|
|
|
|
2016-08-06 16:03:25 +00:00
|
|
|
ENV["NO_RELOAD"] = "1"
|
|
|
|
require "active_support"
|
2006-09-04 03:38:13 +00:00
|
|
|
|
2013-01-24 10:10:58 +00:00
|
|
|
Thread.abort_on_exception = true
|
|
|
|
|
2008-11-20 20:08:42 +00:00
|
|
|
# Show backtraces for deprecated behavior for quicker cleanup.
|
2012-01-06 23:18:12 +00:00
|
|
|
ActiveSupport::Deprecation.debug = true
|
2013-08-21 15:07:33 +00:00
|
|
|
|
2016-04-28 06:59:32 +00:00
|
|
|
# Default to old to_time behavior but allow running tests with new behavior
|
2016-08-06 16:03:25 +00:00
|
|
|
ActiveSupport.to_time_preserves_timezone = ENV["PRESERVE_TIMEZONES"] == "1"
|
2016-04-28 06:59:32 +00:00
|
|
|
|
2013-12-16 18:04:07 +00:00
|
|
|
# Disable available locale checks to avoid warnings running the test suite.
|
|
|
|
I18n.enforce_available_locales = false
|
|
|
|
|
2015-06-11 16:18:33 +00:00
|
|
|
class ActiveSupport::TestCase
|
|
|
|
include ActiveSupport::Testing::MethodCallAssertions
|
2017-01-17 09:50:53 +00: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-06-11 16:18:33 +00:00
|
|
|
end
|