You give jruby_skip & rubinius_skip a good name
This hack prevails everywhere in the codebase by being copy & pasted, and it's actually not a negative thing but a necessary thing for framework implementors, so it should better have a name and be a thing. And with this commit, activesupport/test/abstract_unit.rb now doesn't silently autoload AS::TestCase, so we're ready to establish clearner environment for running AS tests (probably in later commits)
This commit is contained in:
parent
98d0f7ebd3
commit
8d2866bb80
@ -34,17 +34,4 @@ def self.root
|
||||
|
||||
ActionMailer::Base.delivery_job = ActionMailer::MailDeliveryJob
|
||||
|
||||
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"
|
||||
|
@ -350,19 +350,6 @@ class CommentsController < ResourcesController; end
|
||||
class AccountsController < ResourcesController; end
|
||||
class ImagesController < ResourcesController; end
|
||||
|
||||
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
|
||||
|
||||
class DrivenByRackTest < ActionDispatch::SystemTestCase
|
||||
driven_by :rack_test
|
||||
end
|
||||
|
@ -192,17 +192,6 @@ def stderr_logger
|
||||
|
||||
class ActiveSupport::TestCase
|
||||
parallelize
|
||||
|
||||
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"
|
||||
|
@ -11,17 +11,4 @@
|
||||
require "active_support/testing/autorun"
|
||||
require "active_support/core_ext/integer/time"
|
||||
|
||||
class ActiveModel::TestCase < 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"
|
||||
|
@ -13,6 +13,7 @@
|
||||
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 @@ def parallelize_teardown(&block)
|
||||
include ActiveSupport::Testing::TimeHelpers
|
||||
include ActiveSupport::Testing::FileFixtures
|
||||
extend ActiveSupport::Testing::Declarative
|
||||
include ActiveSupport::Testing::AlternativeRuntimeSkipper
|
||||
|
||||
|
||||
# test/unit backwards compatibility methods
|
||||
|
@ -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
|
@ -25,17 +25,4 @@
|
||||
# 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"
|
||||
|
@ -18,19 +18,4 @@ class Application < Rails::Application
|
||||
end
|
||||
end
|
||||
|
||||
class ActiveSupport::TestCase
|
||||
include ActiveSupport::Testing::Stream
|
||||
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user