To view the coverage of your plugins using Rcov, first install the
rcov gem with
sudo gem install rcov, then copy and paste the following onto the end of the
Rakefile inside your plugin directory:
You can now simply run
rake rcov from inside your plugin directory which will generate an
rcov directory with the results. Open
rcov/index.html (if you are on OSX this will open automatically) in a browser to view the results.
Thanks to “Mike Clark”:http://clarkware.com/cgi/blosxom for his “Rcov rake task for Rails”:http://clarkware.com/cgi/blosxom/2007/01/05#RcovRakeTask which this task is based on.
*Update (11-11-08):* Changed code to use the RcovTask class.