From 9dd0a1ecfccefb426d5db1154b4d5cac4cd9bf04 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Mon, 9 Jul 2007 21:02:37 +0000 Subject: [PATCH] ActionItem8: adding proper credit --- lib/tasks/test_rcov.rake | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+), 0 deletions(-) create mode 100644 lib/tasks/test_rcov.rake diff --git a/lib/tasks/test_rcov.rake b/lib/tasks/test_rcov.rake new file mode 100644 index 0000000..5350e57 --- /dev/null +++ b/lib/tasks/test_rcov.rake @@ -0,0 +1,29 @@ +# Copyright (C) 2007, Keegan Quinn +# Copyright (C) 2007, Colivre +# +# See http://keegan.sniz.net/articles/2007/05/27/showin-love-for-rails_rcov +# for original source (a patch for rails_rcov). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +namespace :test do + desc "Run all tests with Rcov to measure coverage" + task :rcov do |t| + puts "Generating full test coverage report..." + test_tasks = Rake::Task.tasks.select{ |t| t.comment && [ 'test:units', 'test:functionals', 'test:integration', 'test:plugins' ].include?(t.name) } + for test_task in test_tasks + Rake::Task[test_task.name + ':rcov'].invoke + end + end +end -- libgit2 0.21.2