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

Only coverage.data is created #51

Open
jperry opened this issue Jun 3, 2011 · 5 comments
Open

Only coverage.data is created #51

jperry opened this issue Jun 3, 2011 · 5 comments

Comments

@jperry
Copy link

jperry commented Jun 3, 2011

Hi,

I am running ruby 1.9.2 and rspec 2.6.0, I run "rake spec" which runs all my rspec tests and only a coverage.data file is created no coverage directory. I only added require 'cover_me' to my spec_helper.rb and this is my Rakefile:

require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)
task :default => :spec

Any help would be great, let me know if you need any more information.

Thanks,
Jay

@sriedel
Copy link

sriedel commented Jun 6, 2011

I had the same issue (just installed today for the first time). For some reason CoverMe.complete! isn't being called. A quickfix that seems to work for me is to edit $GEM_HOME/gems/cover_me*/lib/cover_me.rb and append CoverMe.complete! to the at_exit block at the end of the file.

@macmartine
Copy link

sriedel - Your solution worked for me. Thanks.

@bklang
Copy link

bklang commented Jul 5, 2011

I am having the same issue, and @sriedel's workaround worked for me too.

@timuruski
Copy link

You can also ensure that the complete! method is called with the RSpec config.

RSpec.configure do |config|
  config.after(:suite) do
    CoverMe.complete!
  end
end

@KitaitiMakoto
Copy link
Contributor

I also encountered and resolved this issue by sriedel's way, thank you.
And another way is here:
copy codes of a task from generator template for Rails onto your Rakefile, and you'll find coverage directory after rake spec.

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

6 participants