From 391229eddf22fbb32862c0812e29901151a94f8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 4 Jan 2024 04:04:05 +0000 Subject: [PATCH] Fix force_skip patch --- activesupport/test/core_ext/object/json_gem_encoding_test.rb | 2 +- tools/test_common.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/activesupport/test/core_ext/object/json_gem_encoding_test.rb b/activesupport/test/core_ext/object/json_gem_encoding_test.rb index 56c5f81343..dd777d9017 100644 --- a/activesupport/test/core_ext/object/json_gem_encoding_test.rb +++ b/activesupport/test/core_ext/object/json_gem_encoding_test.rb @@ -40,7 +40,7 @@ def to_json(*) private def require_or_skip(file) - require(file) || force_skip("'#{file}' was already loaded") + force_skip("'#{file}' was already loaded") end def assert_same_with_or_without_active_support(subject) diff --git a/tools/test_common.rb b/tools/test_common.rb index a742ea15b2..fcc8155266 100644 --- a/tools/test_common.rb +++ b/tools/test_common.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +ActiveSupport::TestCase.alias_method :force_skip, :skip + if ENV["BUILDKITE"] require "minitest-ci" ENV.delete("CI") # CI has affect on the applications, and we don't want it applied to the apps. @@ -14,6 +16,5 @@ def skip(message = nil, *) "This should never happen on CI." end end - ActiveSupport::TestCase.alias_method :skip, :force_skip ActiveSupport::TestCase.include(DisableSkipping) end