-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single line conditionals: line coverage #386
Comments
Unfotunately, this is not possible because the underlying ruby Coverage library used by simplecov does not support reporting this kind of data (branch/condition coverage). Sorry to dissapoint! |
Is this still the case with Ruby >= 2.5? |
@joevandyk yes, there's an issue for that. |
@joevandyk there's an open PR even #694 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is it possible to correctly determine the coverage for a single line conditional, e.g.:
As far as I can see this line would be marked as green as soon as the conditional is evaluated, even if it evaluates to
false
and therefore does not execute thefoo
statement.This means that the coverage information about the single
foo
call is lost.Ideally the html formatter could split the line somehow to indicate that only the conditional is covered, but not the actual statement.
Is this possible?
Thanks.
The text was updated successfully, but these errors were encountered: