Skip to content

Instantly share code, notes, and snippets.

@zenspider
Created August 14, 2024 18:58
Show Gist options
  • Save zenspider/f4021591f67d891253f28dc2a3599e60 to your computer and use it in GitHub Desktop.
Save zenspider/f4021591f67d891253f28dc2a3599e60 to your computer and use it in GitHub Desktop.
--- //src/minitest/dev/lib/minitest.rb 2024-08-14 03:41:56.000000000 -0700
+++ /Users/ryan/Work/p4/zss/src/minitest/dev/lib/minitest.rb 2024-08-14 03:41:56.000000000 -0700
@@ -416,7 +416,7 @@
t0 = name = nil
- handler = lambda do
+ @_info_handler = lambda do
unless reporter.passed? then
warn "Current results:"
warn reporter.reporters.grep(SummaryReporter).first
@@ -425,7 +425,7 @@
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
@@ -454,8 +454,8 @@
: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:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment