Just upgraded to the newest RSpec (2.6.0) and found that RCov has stopped working completely? That’s what happened to me after running a bundle update. RCov refused to run, no error messages, just blank output.
After looking around for a little while I found this: https://github.com/rspec/rspec-core/issues/370
In short: the new RSpec has been broken up into modules a tad more, the one that we require for rspec to run correctly ‘autorun’ is not included by default, so to solve this simply add require ‘rspec/autorun’ to the top of your spec_helper.
Can’t see this Gist? View it on Github!
David Chelimsky
May 19, 2011
rspec-core-2.6.1 fixes this
http://blog.davidchelimsky.net/2011/05/19/rspec-core-261-is-released/
Mario Visic
May 20, 2011
Awesome, yeah from the discussion it looked like a fix was coming soon. The rspec gem is still using rspec-core v2.6.0 but i’m sure that will be bumped very shortly :)
David Chelimsky
May 25, 2011
Mario – the rspec gem doesn’t need to bump anything. It already depends on rspec-core ~> 2.6.0. This means that if you run “gem install rspec” now, you’ll get the 2.6.3 gem (there’s already been two more fix releases). If you’re using bundler, run “bundle update rspec” to get same.
Mario Visic
May 25, 2011
Cheers Dave
Seems i’ve misread the gem dependencies, i’m not sure why but I was under the impression that it was hard versioned.
The new rspec-core version works nicely with rcov, thanks :)
DR
Jul 22, 2012
It’s over a year later (July 2012), and I still needed to do this to get rcov running with RSpec (I also needed to add “require ‘rubygems’” to my Rakefile). I’m running the following configuration:
$ rspec –version
2.11.1
$ rcov –version
rcov 1.0.0 2012-02-01
$ ruby –version
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0]
$ gem –version
1.8.24
$ uname -msr
Darwin 10.8.0 i386