2010-06-22 01:02:04 +08:00
|
|
|
ORIG_ARGV = ARGV.dup
|
|
|
|
|
2010-03-17 15:53:48 +08:00
|
|
|
begin
|
|
|
|
old, $VERBOSE = $VERBOSE, nil
|
|
|
|
require File.expand_path('../../../load_paths', __FILE__)
|
|
|
|
ensure
|
|
|
|
$VERBOSE = old
|
|
|
|
end
|
2009-11-10 12:56:49 +08:00
|
|
|
|
2010-08-23 05:43:31 +08:00
|
|
|
require 'active_support/core_ext/kernel/reporting'
|
2011-12-21 01:22:21 +08:00
|
|
|
|
|
|
|
silence_warnings do
|
|
|
|
Encoding.default_internal = "UTF-8"
|
|
|
|
Encoding.default_external = "UTF-8"
|
2010-08-22 13:23:13 +08:00
|
|
|
end
|
|
|
|
|
2012-12-29 03:17:37 +08:00
|
|
|
require 'active_support/testing/autorun'
|
2010-03-17 15:53:48 +08:00
|
|
|
|
2009-03-27 10:10:13 +08:00
|
|
|
ENV['NO_RELOAD'] = '1'
|
2006-07-09 02:14:49 +08:00
|
|
|
require 'active_support'
|
2006-09-04 11:38:13 +08:00
|
|
|
|
2013-01-24 18:10:58 +08:00
|
|
|
Thread.abort_on_exception = true
|
|
|
|
|
2008-11-21 04:08:42 +08:00
|
|
|
# Show backtraces for deprecated behavior for quicker cleanup.
|
2012-01-07 07:18:12 +08:00
|
|
|
ActiveSupport::Deprecation.debug = true
|
2013-08-21 23:07:33 +08:00
|
|
|
|
2013-12-17 02:04:07 +08:00
|
|
|
# Disable available locale checks to avoid warnings running the test suite.
|
|
|
|
I18n.enforce_available_locales = false
|
|
|
|
|
2013-08-22 01:49:03 +08:00
|
|
|
# Skips the current run on Rubinius using Minitest::Assertions#skip
|
2013-08-21 23:07:33 +08:00
|
|
|
def rubinius_skip(message = '')
|
|
|
|
skip message if RUBY_ENGINE == 'rbx'
|
|
|
|
end
|
2013-08-22 01:49:03 +08:00
|
|
|
|
2013-08-21 11:55:28 +08:00
|
|
|
# Skips the current run on JRuby using Minitest::Assertions#skip
|
|
|
|
def jruby_skip(message = '')
|
2014-01-13 19:24:06 +08:00
|
|
|
skip message if defined?(JRUBY_VERSION)
|
2013-08-21 11:55:28 +08:00
|
|
|
end
|
2014-07-20 04:35:12 +08:00
|
|
|
|
|
|
|
require 'mocha/setup' # FIXME: stop using mocha
|
2014-09-02 22:18:23 +08:00
|
|
|
|
|
|
|
# FIXME: we have tests that depend on run order, we should fix that and
|
|
|
|
# remove this method call.
|
|
|
|
require 'active_support/test_case'
|
2014-09-08 20:32:16 +08:00
|
|
|
ActiveSupport::TestCase.test_order = :sorted
|