#primary
Make this criterion the report's primary (leading) criterion.
# File 'lib/simplecov/configuration/coverage.rb', line 166
def primary @config.primary_coverage(@criterion) end
123456789_123456789_123456789_123456789_123456789_
| Relationships & Source Files | |
| Inherits: | Object |
| Defined in: | lib/simplecov/configuration/coverage.rb |
Receiver for a coverage block. Each verb writes a
threshold for the single criterion the block configures, so the value is
always a plain percentage (minimum_per_file 100 is unambiguous) and the
syntax is identical across line, branch, and method coverage.
Overall maximum: fails the build if coverage rises above it.
Maximum allowed drop between runs (maximum_drop 0 refuses any drop).
Overall (suite-wide) minimum for this criterion.
Per-file minimum.
Per-group minimum for the named group (defined via #group).
Make this criterion the report's primary (leading) criterion.
CoverageCriterion
# File 'lib/simplecov/configuration/coverage.rb', line 126
def initialize(config, criterion) @config = config @criterion = criterion end
# File 'lib/simplecov/configuration/coverage.rb', line 138
def maximum(percent) @config.send(:store_overall_threshold, :maximum_coverage, @criterion, percent) end
Maximum allowed drop between runs (maximum_drop 0 refuses any drop).
# File 'lib/simplecov/configuration/coverage.rb', line 149
def maximum_drop(percent) @config.send(:store_overall_threshold, :maximum_coverage_drop, @criterion, percent) end
Overall (suite-wide) minimum for this criterion.
# File 'lib/simplecov/configuration/coverage.rb', line 132
def minimum(percent) @config.send(:store_overall_threshold, :minimum_coverage, @criterion, percent) end
Per-file minimum. With no only:, sets the default applied to every
file; with only: (a String path or Regexp), overrides that default
for the matching files.
# File 'lib/simplecov/configuration/coverage.rb', line 156
def minimum_per_file(percent, only: nil) @config.send(:store_minimum_per_file, @criterion, percent, only) end
Per-group minimum for the named group (defined via SimpleCov::Configuration#group).
# File 'lib/simplecov/configuration/coverage.rb', line 161
def minimum_per_group(percent, only:) @config.send(:store_minimum_per_group, @criterion, percent, only) end
Make this criterion the report's primary (leading) criterion.
# File 'lib/simplecov/configuration/coverage.rb', line 166
def primary @config.primary_coverage(@criterion) end