Skip to content

Commit

Permalink
- Fix incompatibility caused by minitest-hooks & rails invading minit…
Browse files Browse the repository at this point in the history
…est internals.

This introduces a civar which I was trying to avoid.

[git-p4: depot-paths = "//src/minitest/dev/": change = 14282]
  • Loading branch information
zenspider committed Aug 16, 2024
1 parent 9e7c58d commit 0ccdc80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/minitest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ def self.run reporter, options = {}

t0 = name = nil

handler = lambda do
@_info_handler = lambda do
unless reporter.passed? then
warn "Current results:"
warn reporter.reporters.grep(SummaryReporter).first
Expand All @@ -425,7 +425,7 @@ def self.run reporter, options = {}
warn "Current: %s#%s %.2fs" % [self, name, Minitest.clock_time - t0]
end

with_info_handler reporter, handler do
with_info_handler reporter do
filtered_methods.each do |method_name|
name = method_name
t0 = Minitest.clock_time
Expand Down Expand Up @@ -454,8 +454,8 @@ def self.test_order
:random
end

def self.with_info_handler reporter, handler, &block # :nodoc:
on_signal ::Minitest.info_signal, handler, &block
def self.with_info_handler reporter, &block # :nodoc:
on_signal ::Minitest.info_signal, @_info_handler, &block
end

SIGNALS = Signal.list # :nodoc:
Expand Down

0 comments on commit 0ccdc80

Please sign in to comment.