Skip to content


rake test and guard show different coverage reports for the same test suite #130

csommerauer opened this Issue · 7 comments

4 participants


Ruby 1.9.2-p180, Rails 3.0.10, Test::Unit 2.4.5

guard-test (0.4.3)
guard (1.0.0)
simplecov (0.6.1)
simplecov-html (~> 0.5.3)

when running

bundle exec guard

the resulting coverage report is much lower than when running exactly the same test suite with

bundle exec rake:test

which seem to create the right coverage report .

When looking at the coverage within a file (i.e a model class), the only lines highlighted green are the lines with the def keyword and the method calls from within the class (i.e scope, validates, belongs_to and so on).
None of my code is highlight green as tested even though it is highlighted green when running the tests with rake


Please try setting a higher merge_timeout, i.e. SimpleCov.merge_timeout 3600. Check out the README for further info on this.

Also, people using guard & spork had a problem which was resolved with some configuration magic, but since you're using test/unit I assume it won't help you much. I'd still like to at least have it mentioned here - #42

Closing for now, if the problem persists please reopen the issue! And please also report back if and what fixed your problem so future visitors know it helped :)

@colszowka colszowka closed this

Setting a higher merge_timeout did not work.

As I can get the coverage using rake, I don't consider this to be a major issue for me. I'll report back if I find a solution


Cool, thanks!


Is there a solution for the coverage problem today? I just ran into this issue quite a few times, but didn't find any working solution.


@csommerauer Did you ever find a solution for this?


@CharlesP unfortunately not. Sorry


@csommerauer That's a bummer...

@colszowka Can we reopen this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.