public
Rubygem
Description: A collection of useful rake tasks.
Homepage: http://thoughtbot.com
Clone URL: git://github.com/thoughtbot/limerick_rake.git
jyurek (author)
Fri Mar 20 09:01:42 -0700 2009
commit  d8e102e152c4c96f7ad57f07452c8b43c0805971
tree    cd167e6affcfcfe9316f42028861184d6985371a
parent  8b44a7fd2520b80864c03344c8e33c055a95e634
limerick_rake / tasks / coverage.rake
100644 15 lines (12 sloc) 0.498 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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