From 77aa857c71651e599056777cab073b26dfc83f5c Mon Sep 17 00:00:00 2001 From: Homer Simpson Date: Sat, 26 Sep 2009 06:28:09 +0800 Subject: [PATCH] added rake task for rcov --- Rakefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Rakefile b/Rakefile index 34217102..5bb0cafa 100644 --- a/Rakefile +++ b/Rakefile @@ -117,3 +117,13 @@ task 'sinatra.gemspec' => FileList['{lib,test,compat}/**','Rakefile','CHANGES',' File.open(f.name, 'w') { |io| io.write(spec) } puts "updated #{f.name}" end + +# Rcov ============================================================== +namespace :test do + desc 'Mesures test coverage' + task :coverage do + rm_f "coverage" + rcov = "rcov --text-summary --test-unit-only -Ilib" + system("#{rcov} --no-html --no-color test/*_test.rb") + end +end