@@ -4,13 +4,15 | |||||
4 | begin |
|
4 | begin | |
5 | require 'rcov/rcovtask' |
|
5 | require 'rcov/rcovtask' | |
6 |
|
6 | |||
|
7 | rcov_options = "--rails --aggregate test/coverage.data --exclude '/gems/'" | |||
|
8 | ||||
7 | namespace :test do |
|
9 | namespace :test do | |
8 | desc "Aggregate code coverage for all tests" |
|
10 | desc "Aggregate code coverage for all tests" | |
9 | Rcov::RcovTask.new('coverage') do |t| |
|
11 | Rcov::RcovTask.new('coverage') do |t| | |
10 | t.libs << 'test' |
|
12 | t.libs << 'test' | |
11 | t.test_files = FileList['test/{unit,integration,functional}/*_test.rb'] |
|
13 | t.test_files = FileList['test/{unit,integration,functional}/*_test.rb'] | |
12 | t.verbose = true |
|
14 | t.verbose = true | |
13 | t.rcov_opts << '--rails --aggregate test/coverage.data' |
|
15 | t.rcov_opts << rcov_options | |
14 | end |
|
16 | end | |
15 |
|
17 | |||
16 | namespace :coverage do |
|
18 | namespace :coverage do | |
@@ -26,7 +28,7 begin | |||||
26 | t.test_files = FileList['test/{unit,integration,functional}/*_test.rb'] |
|
28 | t.test_files = FileList['test/{unit,integration,functional}/*_test.rb'] | |
27 | t.output_dir = "test/coverage" |
|
29 | t.output_dir = "test/coverage" | |
28 | t.verbose = true |
|
30 | t.verbose = true | |
29 | t.rcov_opts << '--rails --aggregate test/coverage.data' |
|
31 | t.rcov_opts << rcov_options | |
30 | end |
|
32 | end | |
31 |
|
33 | |||
32 | desc "Open the HTML coverage report" |
|
34 | desc "Open the HTML coverage report" |
General Comments 0
You need to be logged in to leave comments.
Login now