Skip to content
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

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

Closed
csommerauer opened this issue May 9, 2012 · 7 comments
Labels

Comments

@csommerauer
Copy link

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

@colszowka
Copy link
Collaborator

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 :)

@csommerauer
Copy link
Author

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

@colszowka
Copy link
Collaborator

Cool, thanks!

@Anonyfox
Copy link

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.

@CharlesP
Copy link

@csommerauer Did you ever find a solution for this?

@csommerauer
Copy link
Author

@CharlesP unfortunately not. Sorry

@CharlesP
Copy link

@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
Labels
Projects
None yet
Development

No branches or pull requests

4 participants