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:
desc'Measures test coverage using rcov'task:rcovdorm_f"coverage"rm_f"coverage.data"rcov="rcov --rails --aggregate coverage.data --text-summary -Ilib"system("#{rcov} --html #{Dir.glob('test/**/*_test.rb').join(' ')}")system("open coverage/index.html")ifPLATFORM['darwin']end
You can now simply run rake rcov from inside your plugin directory which will generate a coverage directory with the results. Open coverage/index.html (if you are on OSX this will open automatically) in a browser to view the results.