Skip to content

Commit

Permalink
Make coverage testing work with parallel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Dec 18, 2020
1 parent c63637f commit c9a4c78
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test_helper.rb
Expand Up @@ -43,6 +43,14 @@ class TestCase
# 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
Expand Down

0 comments on commit c9a4c78

Please sign in to comment.