Install simplecov, require a minimum coverage

If someone submits a PR and doesn't write tests, having a minimum
coverage could help. CI should fail, because simplecov will exit with
a non-zero status. For example:

```
Line coverage (92.48%) is below the expected minimum coverage (93.00%).
SimpleCov failed with exit 2 due to a coverage related error
```
This commit is contained in:
Jared Beck 2021-07-24 23:08:17 -04:00
parent 6f46e4e1d4
commit ebe4be07f1
2 changed files with 7 additions and 0 deletions

View File

@ -73,6 +73,7 @@ has been destroyed.
s.add_development_dependency "rubocop-packaging", "~> 0.5.1"
s.add_development_dependency "rubocop-performance", "~> 1.11.3"
s.add_development_dependency "rubocop-rspec", "~> 2.4.0"
s.add_development_dependency "simplecov", ">= 0.21", "< 0.22"
# ## Database Adapters
#

View File

@ -3,6 +3,12 @@
ENV["RAILS_ENV"] ||= "test"
ENV["DB"] ||= "sqlite"
require "simplecov"
SimpleCov.start do
add_filter "spec"
end
SimpleCov.minimum_coverage 92.4
require "byebug"
require_relative "support/pt_arel_helpers"