spec_helper: clarify comment and scope to all OS

This commit is contained in:
Bo Anderson 2024-10-27 15:38:23 +00:00
parent 92fee908ba
commit 46cb9ec947
No known key found for this signature in database

View File

@ -10,10 +10,13 @@ if ENV["HOMEBREW_TESTS_COVERAGE"]
]
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(formatters)
# Needed for outputting coverage reporting only once for parallel_tests
if RUBY_PLATFORM[/darwin/] && ENV["TEST_ENV_NUMBER"]
# Needed for outputting coverage reporting only once for parallel_tests.
# Otherwise, "Coverage report generated" will get spammed for each process.
if ENV["TEST_ENV_NUMBER"]
SimpleCov.at_exit do
result = SimpleCov.result
# `SimpleCov.result` calls `ParallelTests.wait_for_other_processes_to_finish`
# internally for you on the last process.
result.format! if ParallelTests.last_process?
end
end