Make coverage testing work with parallel tests

https://github.com/simplecov-ruby/simplecov/issues/718#issuecomment-538201587
This commit is contained in:
Tom Hughes 2020-12-18 22:39:23 +00:00
parent c63637f304
commit c9a4c78146

View file

@ -43,6 +43,14 @@ module ActiveSupport
# Run tests in parallel with specified workers
parallelize(:workers => :number_of_processors)
parallelize_setup do |worker|
SimpleCov.command_name "#{SimpleCov.command_name}-#{worker}"
end
parallelize_teardown do
SimpleCov.result
end
##
# takes a block which is executed in the context of a different
# ActionController instance. this is used so that code can call methods