Class: ParallelCoverage
- Inherits:
-
Object
- Object
- ParallelCoverage
- Defined in:
- lib/parallel_coverage.rb,
lib/parallel_coverage/engine.rb,
lib/parallel_coverage/version.rb
Defined Under Namespace
Classes: Engine
Constant Summary collapse
- VERSION =
'1.0.2'
Class Method Summary collapse
Class Method Details
.parallelize_coverage ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/parallel_coverage.rb', line 25 def self.parallelize_coverage return unless ENV['COVERAGE'] ActiveSupport::TestCase.parallelize_setup do |worker| SimpleCov.command_name "#{SimpleCov.command_name}-#{worker}" end ActiveSupport::TestCase.parallelize_teardown do SimpleCov.result end end |
.run_coverage ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/parallel_coverage.rb', line 9 def self.run_coverage return unless ENV['COVERAGE'] require 'simplecov' SimpleCov.start 'rails', &simple_cov_config rescue RuntimeError => e raise e if ENV['COVERBAND_DISABLE_AUTO_START'] $stdout.puts <<~TEXT.squish Warning: Are you using Coverband? If so, please disable by setting COVERBAND_DISABLE_AUTO_START=1. See https://github.com/danmayer/coverband#manually-starting-coverband TEXT end |