ackama / rails-template

Application template for Rails 7 projects; preloaded with best practices for TDD, security, deployment, and developer productivity.
Other
306 stars 18 forks source link

Enable branch coverage in SimpleCov #343

Closed G-Rath closed 2 years ago

G-Rath commented 2 years ago

Currently we're only measuring line coverage, which means one line conditionals like guards are always considered covered even though these often have important behaviour that we should make sure we cover. This also doesn't combine well with our rubocop rules which require us to use one-line guards when possible, which results in "hiding" code from coverage.

https://github.com/simplecov-ruby/simplecov#branch-coverage-ruby--25

eoinkelly commented 2 years ago

How big an impact will this have on a team hitting a particular coverage percentage. I :100: agree this is a good idea but we should do some comms with teams beforehand if merging this means hitting 95% will be a lot more work.