Skip to content

Commit

Permalink
Merge pull request rails#52631 from zenspider/zenspider/minitest-cleanup
Browse files Browse the repository at this point in the history
Bump minitest to 5.25.1 and clean up hacks.
  • Loading branch information
tenderlove authored Aug 16, 2024
2 parents 36b030d + 2650a05 commit b26a9fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ GEM
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.25.0)
minitest (5.25.1)
minitest-bisect (1.7.0)
minitest-server (~> 1.0)
path_expander (~> 1.1)
Expand Down
25 changes: 2 additions & 23 deletions activesupport/lib/active_support/testing/parallelization/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,8 @@ def perform_job(job)

set_process_title("#{klass}##{method}")

result = nil

# TODO: Remove conditional when we support on minitest 5.25+
if klass.method(:with_info_handler).arity == 2
t0 = nil

handler = lambda do
unless reporter.passed? then
warn "Current results:"
warn reporter.reporters.grep(SummaryReporter).first
end

warn "Current: %s#%s %.2fs" % [klass, method, Minitest.clock_time - t0]
end

result = klass.with_info_handler reporter, handler do
t0 = Minitest.clock_time
Minitest.run_one_method(klass, method)
end
else
result = klass.with_info_handler reporter do
Minitest.run_one_method(klass, method)
end
result = klass.with_info_handler reporter do
Minitest.run_one_method(klass, method)
end

safe_record(reporter, result)
Expand Down

0 comments on commit b26a9fd

Please sign in to comment.