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

Simplecov with Spork? #30

Closed
neezer opened this issue Mar 20, 2011 · 14 comments
Closed

Simplecov with Spork? #30

neezer opened this issue Mar 20, 2011 · 14 comments

Comments

@neezer
Copy link

neezer commented Mar 20, 2011

Is there anyway to make simplecov work with spork? I can only seem to get test coverage results when I don't have spork running...

https://github.com/timcharper/spork

@dre3k
Copy link

dre3k commented Apr 2, 2011

Works fine for me.

Gemfile:
gem 'simplecov', '>= 0.4.2', :require => false, :group => :test
spec_helper.rb:
Spork.each_run do
# This code will be run each time you run your specs.
require 'simplecov'
SimpleCov.start 'rails'
# ...
end

@neezer
Copy link
Author

neezer commented Apr 4, 2011

So it does. My bad.

@neezer neezer closed this as completed Apr 4, 2011
@masonicboom
Copy link

I get "0 / 0 LOC (0.0%) covered." with that method, dre3k. Any idea why that would happen? I'll dig in when I have a chance, but any leads would help. Do you not get that 0/0 LOC covered, neezer?

@neezer
Copy link
Author

neezer commented Apr 19, 2011

@masonicboom - nope, I get normal coverage reports (no error) using what dre3k had written.

@masonicboom
Copy link

hmm... guess I'm on my own figuring this out. Thanks for letting me know.

On Tue, Apr 19, 2011 at 4:52 PM, neezer <
reply@reply.github.com>wrote:

@masonicboom - nope, I get normal coverage reports (no error) using what
dre3k had written.

Reply to this email directly or view it on GitHub:
#30 (comment)

@jeffshantz
Copy link

@masonicboom: Did you ever figure out the 0/0 LOC issue? I'm getting this as well. Thanks.

@Esteth
Copy link

Esteth commented Jul 5, 2011

@masonicboom: Also getting this issue with 0/0 LOC

@Esteth
Copy link

Esteth commented Jul 8, 2011

Solved: The issue for me was that I had cache-classes enabled in my testing environment config. This means simplecov can't inspect loads of files, since they're all done in the application.initialize! call.

@masonicboom
Copy link

I can't remember if I ever solved this for myself; might've just run simplecov w/o spork until i got close enough to 100%, then stopped using it

@jeffshantz
Copy link

@Esteth: Hmm.. tried that and no dice. @masonicboom: Yeah, it's not a huge deal to have Spork automatically run Simplecov. Think I'll file it under "would be nice" and just run it manually, in the interest of time.

@pupeno
Copy link

pupeno commented Sep 22, 2011

I'm having a similar issue, no data generated, without using spork, and setting config.cache_classes to false made it generate some data.

@heaven
Copy link

heaven commented Jan 28, 2012

Same issue, 0 / 0 LOC (0.0%) covered, cache classes is set to false

@kevindavis
Copy link

Per @Esteth's reply, I changed the cache classes line to false in /config/test.rb and simplecov started working

@zxiest
Copy link

zxiest commented Apr 2, 2012

@kevindavis 's solution fixes it for me! Thank you, Kevin :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants