Skip to content
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

Support for postfix conditionals and partial line executions #105

Closed
gioele opened this issue Jan 22, 2012 · 1 comment
Closed

Support for postfix conditionals and partial line executions #105

gioele opened this issue Jan 22, 2012 · 1 comment
Labels

Comments

@gioele
Copy link

gioele commented Jan 22, 2012

Code with postfix conditionals like

cond = false
a = 1 if cond
a ||= 2

will show up as 100% covered while it has been covered only partially (I'd say 75%). This is probably because the if cond part has been executed and that makes simplecov think that all the code on that line has been excuted.

@colszowka
Copy link
Collaborator

SimpleCov relies on the Ruby STDLIB Coverage library, which is a C0 coverage utility. Check this blog post for a ruby-based explanation of the differences: http://dev-logger.blogspot.com/2008/06/c0-c1-and-c2-coverage.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants