1

This may seem obvious but I don't find a way to run Rcov or coverMe outside a Rails project. I would like to use it with Rspec 2.5 I am using Ruby 1.9.2 so I guess this may be the problem.

I also would like not to use rake tasks but a command on the command line. I have tried several things and the best result I got is Rcov report for :

/var/lib/gems/1.9.1/gems/rcov-0.9.9/lib/rcov/code_coverage_analyzer.rb

and

/var/lib/gems/1.9.1/gems/rcov-0.9.9/lib/rcov/code_coverage_analyzer.rb

No idea why

Jordi
  • 1,212
  • 2
  • 11
  • 25

3 Answers3

2

Check out http://ruby-toolbox.com/categories/code_metrics.html for some alternatives to RCov if using Ruby 1.9 is the problem.

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
2

SimpleCov, it runs awesome outside the Rails box.

http://rubydoc.info/gems/simplecov/0.5.4/frames

Payal
  • 21
  • 1
1

The latest available version of rcov (0.9.8) still doesn't have good support for 1.9.2. You can try to run it on your project by doing:

 rcov spec/*.rb

But you'll most likely get something like:

 ** WARNING: Ruby 1.9 Support is experimental at best. Don't expect correct results! **

And then some errors after that.

Federico Builes
  • 4,939
  • 4
  • 34
  • 48