Class: SimpleCov::RSpec
- Inherits:
-
Object
- Object
- SimpleCov::RSpec
- Defined in:
- lib/simplecov-rspec.rb
Overview
Configure SimpleCov to fail RSpec if the test coverage falls below a given threshold
Configures RSpec to:
- Fail (and exit with with a non-zero exitcode) if the test coverage is below the configured threshold and
- (optionally) list the lines of code not covered by tests.
Simply add the line SimpleCov::RSpec.start
in place of SimpleCov::Start
in
the project's spec_helper.rb
. This line must appear before the project is
required.
Defined Under Namespace
Classes: UncoveredLine
Class Method Summary collapse
-
.start(coverage_threshold: 100, fail_on_low_coverage: true, list_uncovered_lines: false, rspec_dry_run: ::RSpec.configuration.dry_run?, env: ENV, &start_config_block) ⇒ Void
Configure and start SimpleCov for RSpec.
Class Method Details
.start(coverage_threshold: 100, fail_on_low_coverage: true, list_uncovered_lines: false, rspec_dry_run: ::RSpec.configuration.dry_run?, env: ENV, &start_config_block) ⇒ Void
Configure and start SimpleCov for RSpec
133 |
# File 'lib/simplecov-rspec.rb', line 133 def self.start(...) = new(...).send(:start) |