mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
Add simplecov (#760)
This commit is contained in:
parent
ac46c0c5a9
commit
22e6919eb5
4 changed files with 29 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
if ENV["COVERAGE"]
|
||||
require "simplecov"
|
||||
SimpleCov.start "rails" do
|
||||
enable_coverage :branch
|
||||
end
|
||||
end
|
||||
|
||||
# Test ENV setup:
|
||||
# By default, all features should be disabled
|
||||
# Use the `with_env_overrides` helper to enable features for individual tests
|
||||
|
@ -28,6 +35,17 @@ module ActiveSupport
|
|||
# Run tests in parallel with specified workers
|
||||
parallelize(workers: :number_of_processors)
|
||||
|
||||
# https://github.com/simplecov-ruby/simplecov/issues/718#issuecomment-538201587
|
||||
if ENV["COVERAGE"]
|
||||
parallelize_setup do |worker|
|
||||
SimpleCov.command_name "#{SimpleCov.command_name}-#{worker}"
|
||||
end
|
||||
|
||||
parallelize_teardown do |worker|
|
||||
SimpleCov.result
|
||||
end
|
||||
end
|
||||
|
||||
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
||||
fixtures :all
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue