colszowka/simplecov — Issue #92: Blank lines and comments showing as "uncovered"?
Author: andyhite
Created: 2011-11-03 22:03:42+00:00
State: open

I've been using SimpleCov for two separate projects, and this problem seems to pop up in both of them for no apparent reason...

In some classes I get "missed lines" for blank lines (usually the whitespace between two methods - between the first method's end and the next method's def). This also seems to pop up (on occasion) for comment lines and the actual "end" of a method definition.

It seems like the blank lines are being counted as "relevant lines" when they shouldn't be.

I've had a few instances where on the first run of the report it shows everything at 100%, then on a subsequent run (without any change to the code) these blank lines show up.

Is this a known issue? Is caused by something I'm doing wrong or an issue with SimpleCov?

I'm using SimpleCov with Test::Unit (along with shoulda-context and shoulda-matchers). I use Spork for tests while developing, but run my test suite without Spork when I need a coverage report. The SimpleCov require and initialization are at the very top of my test_helper.rb and not inside the Spork.prefork or Spork.each_run blocks.