spec_helper: clarify comment and scope to all OS
This commit is contained in:
parent
92fee908ba
commit
46cb9ec947
@ -10,10 +10,13 @@ if ENV["HOMEBREW_TESTS_COVERAGE"]
|
|||||||
]
|
]
|
||||||
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(formatters)
|
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(formatters)
|
||||||
|
|
||||||
# Needed for outputting coverage reporting only once for parallel_tests
|
# Needed for outputting coverage reporting only once for parallel_tests.
|
||||||
if RUBY_PLATFORM[/darwin/] && ENV["TEST_ENV_NUMBER"]
|
# Otherwise, "Coverage report generated" will get spammed for each process.
|
||||||
|
if ENV["TEST_ENV_NUMBER"]
|
||||||
SimpleCov.at_exit do
|
SimpleCov.at_exit do
|
||||||
result = SimpleCov.result
|
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?
|
result.format! if ParallelTests.last_process?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user