Class: CliCoverage
- Inherits:
-
Object
- Object
- CliCoverage
- Defined in:
- lib/cli_coverage.rb
Class Method Summary collapse
Class Method Details
.conditionally_activate ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/cli_coverage.rb', line 2 def self.conditionally_activate return if !ENV.key?("COVERAGE") # Collect coverage separately ENV["SIMPLECOV_COMMAND_NAME"] = "#{ENV.fetch('COVERAGE')} #{ARGV.join(' ')} coverage" require "simplecov" # Silence output SimpleCov.formatter = SimpleCov::Formatter::SimpleFormatter SimpleCov.print_error_status = false # Ensure SimpleCov doesn't filter out all out code project_root = File.("..", __dir__) SimpleCov.root project_root end |