Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Coco output difference when running `rake` and `rspec spec` #20

ghost opened this Issue Aug 30, 2013 · 4 comments


None yet
1 participant

ghost commented Aug 30, 2013

Hi, I've noticed an issue with Coco's coverage metrics, specifically with Rails 4 and Rspec 2.

When I run rspec spec I get the coverage report I'd expect. When I run rake spec I get a lot of 0% coverage on files that have 100% coverage when I run the former command.

Anyone else experiencing this phenomenon?


lkdjiin commented Aug 31, 2013

Hi BigNerdRanchDan, thanks for the report. I will check this issue ASAP.


lkdjiin commented Sep 3, 2013

I can't reproduce this issue. I have never used rake spec before and I can't use it right now: all my projects crash with this command due to some issues with the database (postgres). Could you give me more clues? Where exactly do you put the require 'coco' line?


ghost commented Sep 3, 2013

Hi @lkdjiin, I was able to resolve it. The issue was the I'm using Bundler with RVM, so I just had to modify it to not require automatically:

group :test do
  gem 'coco', require: false

Now that I have that in my Gemfile (and require 'coco' in spec_helper.rb), the output is the same between rake spec and rspec spec.

@ghost ghost closed this Sep 3, 2013


lkdjiin commented Sep 3, 2013

Cool, thank you for the tip.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment