namespace :test do

  desc 'Measures test coverage'
  task :coverage do
    rm_f "coverage"
    rm_f "coverage.data"
    rcov = "rcov --rails --aggregate coverage.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 coverage/index.html") if PLATFORM['darwin']
  end

end

Add task for measuring test coverage
Add task for measuring test coverage


git-svn-id: 801577a2cbccabf54a3a609152c727abd26e524a@1249 a18515e9-6cfd-0310-9624-afb4ebaee84e
