aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/test_case.rb2
-rw-r--r--activesupport/lib/active_support/testing/alternative_runtime_skipper.rb18
-rw-r--r--activesupport/test/abstract_unit.rb13
3 files changed, 20 insertions, 13 deletions
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb
index 0b1cefc5e1..c513c76315 100644
--- a/activesupport/lib/active_support/test_case.rb
+++ b/activesupport/lib/active_support/test_case.rb
@@ -13,6 +13,7 @@ require "active_support/testing/constant_lookup"
require "active_support/testing/time_helpers"
require "active_support/testing/file_fixtures"
require "active_support/testing/parallelization"
+require "active_support/testing/alternative_runtime_skipper"
require "concurrent/utility/processor_counter"
module ActiveSupport
@@ -143,6 +144,7 @@ module ActiveSupport
include ActiveSupport::Testing::TimeHelpers
include ActiveSupport::Testing::FileFixtures
extend ActiveSupport::Testing::Declarative
+ include ActiveSupport::Testing::AlternativeRuntimeSkipper
# test/unit backwards compatibility methods
diff --git a/activesupport/lib/active_support/testing/alternative_runtime_skipper.rb b/activesupport/lib/active_support/testing/alternative_runtime_skipper.rb
new file mode 100644
index 0000000000..f9e6eaff2f
--- /dev/null
+++ b/activesupport/lib/active_support/testing/alternative_runtime_skipper.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+module ActiveSupport
+ module Testing
+ module AlternativeRuntimeSkipper
+ private
+ # 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
+ end
+ end
+end
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb
index b46ad6842f..a14748a6b3 100644
--- a/activesupport/test/abstract_unit.rb
+++ b/activesupport/test/abstract_unit.rb
@@ -25,17 +25,4 @@ ActiveSupport.to_time_preserves_timezone = ENV["PRESERVE_TIMEZONES"] == "1"
# Disable available locale checks to avoid warnings running the test suite.
I18n.enforce_available_locales = false
-class ActiveSupport::TestCase
- private
- # 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
-end
-
require_relative "../../tools/test_common"