-
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
non-covered code shown as covered. #365
Comments
I can't duplicate without example, but please see #340 SimpleCov doesn't record tested code. It records executed code. So, assuming simplecov starts before any app code is loaded or run, it will record any code executed simply by requiring/loading the file, and any tests that execute that code. The best you could do, and this is just regular ruby, is def method_i_am_not_testing
puts "And yet I am being called by #{caller[0]}"
end |
Please re-open with any new info if you believe I closed this in error. |
Alright, I found what was doing it. It was called indirectly by another method which I am using in a test I didn't finish writing yet. What bugs me is that testing the bigger methods implies testing some of the smaller ones. In practice, I like to test each method individually. |
Well, the real problem is that we are using newly executed code for tested code. That's just the nature of the beast, for now. |
There is a block of code in our application that was not tested but still highlighted in green. Is there a way to see where this come from?
The text was updated successfully, but these errors were encountered: