Fix force_skip patch

This commit is contained in:
Rafael Mendonça França 2024-01-04 04:04:05 +00:00
parent ad343c5034
commit 391229eddf
No known key found for this signature in database
GPG Key ID: FC23B6D0F1EEE948
2 changed files with 3 additions and 2 deletions

@ -40,7 +40,7 @@ def to_json(*)
private private
def require_or_skip(file) def require_or_skip(file)
require(file) || force_skip("'#{file}' was already loaded") force_skip("'#{file}' was already loaded")
end end
def assert_same_with_or_without_active_support(subject) def assert_same_with_or_without_active_support(subject)

@ -1,5 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
ActiveSupport::TestCase.alias_method :force_skip, :skip
if ENV["BUILDKITE"] if ENV["BUILDKITE"]
require "minitest-ci" require "minitest-ci"
ENV.delete("CI") # CI has affect on the applications, and we don't want it applied to the apps. 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." "This should never happen on CI."
end end
end end
ActiveSupport::TestCase.alias_method :skip, :force_skip
ActiveSupport::TestCase.include(DisableSkipping) ActiveSupport::TestCase.include(DisableSkipping)
end end