1
votes

I'm using SimpleCov with my rails app. Everything is working, but there seems to be a bug or i'm doing something wrong.

My test coverage when I run rake test comes back at 90.77%.

Then rake test TEST=test/path/to/file_test which returns 66%.

Finally, rake test and the coverage returned is 66%.

Is there some caching issue i'm missing? Also, I've notice all the sudden on the low 66% it seems to be counting all the blank lines as failed(see img).

enter image description here

1

1 Answers

1
votes

It's caused by this bug at the merge process: https://github.com/colszowka/simplecov/issues/444. The suggested workaround worked for me:

At lib/simplecov/merge_helpers.rb replace if element.nil? && new_array[i].nil? with if element.nil? || new_array[i].nil?

All credit goes to ksmurphy.