Created
July 2, 2011 14:43
-
-
Save krames/1060577 to your computer and use it in GitHub Desktop.
Rcov rake task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :test do | |
desc "Generate code coverage with rcov" | |
task :coverage do | |
rm_rf "doc/coverage/coverage.data" | |
rm_rf "doc/coverage" | |
mkdir "doc/coverage" | |
rcov = %(rcov --rails --aggregate doc/coverage/coverage.data --exclude gems --text-summary -Ilib:test --html -o doc/coverage test/**/*_test.rb) | |
system rcov | |
system "open doc/coverage/index.html" if PLATFORM['darwin'] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There seems to be a lack of working rcov rake tasks out there, so I though I would share mine.