rails/tools/test_common.rb
Rafael Mendonça França 391229eddf
Fix force_skip patch
2024-01-04 04:04:05 +00:00

21 lines
703 B
Ruby

# 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.
Minitest::Ci.report_dir = File.join(__dir__, "../test-reports/#{ENV['BUILDKITE_JOB_ID']}")
module DisableSkipping # :nodoc:
private
def skip(message = nil, *)
flunk "Skipping tests is not allowed in this environment (#{message})\n" \
"Tests should only be skipped when the environment is missing a required dependency.\n" \
"This should never happen on CI."
end
end
ActiveSupport::TestCase.include(DisableSkipping)
end