Revision 1745
Added by Eric Davis almost 17 years ago
trunk/lib/tasks/testing.rake | ||
---|---|---|
4 | 4 |
begin |
5 | 5 |
require 'rcov/rcovtask' |
6 | 6 | |
7 |
rcov_options = "--rails --aggregate test/coverage.data --exclude '/gems/'" |
|
8 | ||
7 | 9 |
namespace :test do |
8 | 10 |
desc "Aggregate code coverage for all tests" |
9 | 11 |
Rcov::RcovTask.new('coverage') do |t| |
10 | 12 |
t.libs << 'test' |
11 | 13 |
t.test_files = FileList['test/{unit,integration,functional}/*_test.rb'] |
12 | 14 |
t.verbose = true |
13 |
t.rcov_opts << '--rails --aggregate test/coverage.data'
|
|
15 |
t.rcov_opts << rcov_options
|
|
14 | 16 |
end |
15 | 17 | |
16 | 18 |
namespace :coverage do |
... | ... | |
26 | 28 |
t.test_files = FileList['test/{unit,integration,functional}/*_test.rb'] |
27 | 29 |
t.output_dir = "test/coverage" |
28 | 30 |
t.verbose = true |
29 |
t.rcov_opts << '--rails --aggregate test/coverage.data'
|
|
31 |
t.rcov_opts << rcov_options
|
|
30 | 32 |
end |
31 | 33 |
|
32 | 34 |
desc "Open the HTML coverage report" |
Also available in: Unified diff
Extracted rcov options and removed gems from the rcov report.