You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am traveling for awhile so it will take me a bit of time to dig into this. Could you give me a bit more info to help me debug.
What OS are you on?
What version of Ruby are you using?
Are there any other gems included in the project when running the example?
thanks, hopefully I can figure out a fix, using set_trace_func isn't perfect in what it reports back. I still need to look at using some of the newer methods available to release a Ruby 2.1.2+ only version of coverband which would be even faster and have better accuracy.
So the issue is that when using the manual start and stop you still need to take a baseline. This is because set_trace_func only captures the lines executed, and block ending lines aren't considered executed, they just halt the current scope. The baseline run, recorded various things that never get covered in a way that is considered executed, it is stored as a baseline of what coverage looks like just loading ruby files. After coverband has run recording actual executed lines that data is merged with the baseline. This gives the complete picture of code coverage. You can see this in the screenshot I have included.
I created a tiny example git repo, which shows the code you were working with. It includes a new file called baseline.rb If you run that it records the baseline data into tmp, which gets merged into the coverage data when you run your original test.rb
I hope this helps explain what was going on and makes it a little more clear how coverband works. Let me know if you have any more questions or comments.
with this code:
I get
It seems to me like this should be 100% covered, and those lines marked as uncovered are incorrect.
The text was updated successfully, but these errors were encountered: