-
Notifications
You must be signed in to change notification settings - Fork 552
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
No data is generated #82
Comments
A screenshot: http://i.imgur.com/t3lyv.png |
Setting config.cache_classes to false made it generate some data. |
I am seeing the same issue, but with Rspec. Ruby 1.9.2 p290, Rails 3.1. If I use SimpleCov.start in spec_helper.rb, it only shows my spec files in the coverage report (of course they are all 100%) and if I use SimpleCov.start 'rails', then it doesn't show any data at all. |
I got the same issue too. |
Hi guys, same issue here too. |
I have the same issue too |
Hey guys. For some reason I'm not getting mails from github on new issues, sorry for being late :) Actually SimpleCov.command_name will need an argument, like "Unit Tests". Could you please try to go with |
SimpleCov.command_name 'RSpec' not works for me =/ |
Didn't work for me either. |
Hey guys I changed the gem's declaration in my Gemfile and it works. gem 'simplecov', :require => false Then I removed the 'require => false' Now it works fine. |
Hey guys. I write setting first line on test/test_helper.rb require 'simplecov'
SimpleCov.start 'rails' do
add_filter "/gems/"
end
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__) It work fine. |
I did some more investigation and I still can't get simplecov to generate any report data other than on my spec files (which all report 100%). I tried several permutations of requiring the gem in the Gemfile or in the spec_helper, Simplecov.start with and without 'rails', and also including or not including the command_line calls. Still no luck. :( |
I was requiring simplecov after doing require File.expand_path('../../config/environment', FILE), now I put the require and start for simplecov on top, as instructed by the documentation (doh!) and it worked. |
Ahh ha! Pupeno nailed the problem. You must place the require and start calls before File.expand_path... to get it to work. This could definitely be made more clear in the README as several of us have run into this gotcha. |
Fix confirmed - same for me: moved the Simplecov.start above file expand and it alls works. Fab stuff! |
Guys, I'm glad you managed to figure this one out yourselves. I already went through various permutations of the README to make it superclear that the require should be happening before loading anything else, so obviously I didn't even consider mentioning this here as a possible source for the problem. Great that you've got it to work anyway :) If you have suggestions on how to improve the README so that your past selfs would have realized this earlier please let me know :) Also, if someone in here bumps into partially "vanishing" coverage (particularily using rspec) please check out #60. That one is a nasty motherfucker I'm telling you... |
LOL - yeah, so that's pretty obvious. I read about simplecov elsewhere, and google brought me to this page, not the readme. At least it'll help future selfs figure out the problem quick, plus give them a chance to laugh at us doofuses! :) |
im facing the same issue :( Does the test gemfile and application gemfile need to be the same.. my application has a separate gemfile so where do i start simplecov? |
I had this issue, not with rails, but with a gem I was developing and removing |
If someone is not finding a solution. My problem in a Rails project was not having a .rspec file with inside |
Hello,
I'm not sure when simplecov stopped generating data for my project, the html is generated but no file is mentioned. I'm configuring it this way:
and I have this gems installed:
while running ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0]
The text was updated successfully, but these errors were encountered: