namespace :test do

  desc 'Test Coverage'
  task :rcoverage do
    rm_f "rcoverage"
    rm_f "rcoverage.data"
    rcov = "rcov --rails --aggregate rcoverage.data --text-summary -Ilib"
    system("#{rcov} --no-html test/unit/*_test.rb")
    system("#{rcov} --no-html test/functional/*_test.rb")
    system("#{rcov} --html test/integration/*_test.rb")
    system("open rcoverage/index.html")
  end

end