Thursday, January 26, 2012

RCov Tips

1. How to turn off rcov for specific sections in a file:
Start and end with :

#:nocov:

in your file.

2. How to exclude files from rcov:

In spec directory, edit rcov.opts

 append our path of files to –exclude option. Eg: –exclude “helpers/*,app/sweepers/*”.

Reference

http://psixty.wordpress.com/2010/06/22/how-to-exclude-files-in-rcova-code-coverage-tool-in-ruby/