Created
July 10, 2010 18:19
-
-
Save Cannibook/470917 to your computer and use it in GitHub Desktop.
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 'Measures test coverage' | |
task :coverage do | |
rm_f "coverage" | |
rm_f "coverage.data" | |
rcov = "rcov -Itest --rails --aggregate coverage.data -T -x \" rubygems/*,/Library/Ruby/Site/*,gems/*,rcov*\"" | |
system("#{rcov} --no-html test/unit/*_test.rb test/unit/helpers/*_test.rb") | |
system("#{rcov} --no-html test/functional/*_test.rb") | |
system("#{rcov} --html test/integration/*_test.rb") | |
system("open 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