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...
Works fine for me.
gem 'simplecov', '>= 0.4.2', :require => false, :group => :test
# This code will be run each time you run your specs.
So it does. My bad.
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?
@masonicboom - nope, I get normal coverage reports (no error) using what dre3k had written.
@masonicboom: Did you ever figure out the 0/0 LOC issue? I'm getting this as well. Thanks.
@masonicboom: Also getting this issue with 0/0 LOC
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.
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
@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.
I'm having a similar issue, no data generated, without using spork, and setting config.cache_classes to false made it generate some data.
Same issue, 0 / 0 LOC (0.0%) covered, cache classes is set to false
Per @Esteth's reply, I changed the cache classes line to false in /config/test.rb and simplecov started working
@kevindavis 's solution fixes it for me! Thank you, Kevin :-)