Skip to content

Optional exit code > 0 when coverage percentage goes down #11

Description

@colszowka

See http://twitter.com/#!/hayafirst/status/28368786944

And my responses:
Check out custom exit behaviour: http://bit.ly/953iOR - could raise an exception after result change. See http://bit.ly/9PSaOt
Basically, cache the result.covered_percent somewhere, then later compare it with previous and cause an exit with status > 0


This could be an (optional) built-in functionality.
The SimpleCov.result.covered_percent should be stored in coverage_path/last_coverage_percent, then compared with the current run.

Configure with:

SimpleCov.start(:rails) do
  check_coverage_change 
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions