Browse files

add rake rcov task

  • Loading branch information...
1 parent d0d92e8 commit a734921292480b81e8c42102980430bc22febd6e @rlane rlane committed Mar 20, 2011
Showing with 14 additions and 0 deletions.
  1. +14 −0 Rakefile
View
14 Rakefile
@@ -29,3 +29,17 @@ Rake::TestTask.new do |t|
end
YARD::Rake::YardocTask.new
+
+begin
+ require 'rcov/rcovtask'
+ desc 'Measures test coverage using rcov'
+ Rcov::RcovTask.new do |rcov|
+ rcov.pattern = 'test/test_*.rb'
+ rcov.output_dir = 'coverage'
+ rcov.verbose = true
+ rcov.libs << "test"
+ rcov.rcov_opts << '--exclude "gems/*"'
+ end
+rescue LoadError
+ puts "Rcov not available. Install it with: gem install rcov"
+end

0 comments on commit a734921

Please sign in to comment.