Skip to content

Commit

Permalink
add error reporting before abort
Browse files Browse the repository at this point in the history
  • Loading branch information
stephsachrajda committed Oct 13, 2023
1 parent 209e7bc commit 0993188
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ruby/lib/rspec/queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,17 @@ def call(options, stdout, stderr)
end

unless supervisor.exhausted?
errors = supervisor.build.error_reports.sort_by(&:first).map(&:last)
if errors.empty?
step(green('No errors found'))
0
else
message = errors.size == 1 ? "1 error found" : "#{errors.size} errors found"
step(red(message), collapsed: false)
puts errors
1
end

abort! "#{supervisor.size} tests weren't run."
end
end
Expand Down

0 comments on commit 0993188

Please sign in to comment.