Conversation
coorasse
left a comment
There was a problem hiding this comment.
From the last discussion, we should enable grouped coverage.
Why? I don't see how this relates to the app setup for eval coverage. |
|
The coverage groups would mainly be relevant in existing projects when we introduce eval. |
|
I am a bit afraid of being too strict. But you are right! Let's see if that's fine also for others |
Can't we say the same about the 100% line and branch coverage requirements on ruby files too? |
|
From my point of. view most of the business logic, which is what I mostly care about stays in rb files. I'd expect the little logic that stays in the views to be more frontend-related, and therefore not that business critical. |
rnestler
left a comment
There was a problem hiding this comment.
I think since one usually doesn't have much logic in the templates the coverage should be easy to reach. And if not everything is covered it is helpful to know since it can indicate:
- Dead / unreachable code in the template
- Edge cases that were forgotten to test
- To much logic in the templates such that it gets hard to test all edge cases
Only downside is probably a bit longer test run?
Since a couple years time, simplecov supports eval coverage.
This allows us to also check for branch and line coverage within
erbfiles.Most importantly views
html.erb. I propose we check the eval coverage in new applications by default.Related PRs: