File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -44,10 +44,12 @@ namespace :test do
44
44
if RUBY_VERSION =~ /^1.8/
45
45
Rake ::Task [ 'rcov:client' ] . invoke
46
46
Rake ::Task [ 'rcov:provider' ] . invoke
47
+ Rake ::Task [ 'rcov:activerecord_provider' ] . invoke
47
48
else
48
49
ENV [ 'COVERAGE' ] = 'true'
49
50
Rake ::Task [ 'test:client' ] . invoke
50
51
Rake ::Task [ 'test:provider' ] . invoke
52
+ Rake ::Task [ 'test:activerecord_provider' ] . invoke
51
53
end
52
54
53
55
system ( "open coverage/index.html" ) if ( PLATFORM [ 'darwin' ] if Kernel . const_defined? :PLATFORM ) || ( RUBY_PLATFORM =~ /darwin/ if Kernel . const_defined? :RUBY_PLATFORM )
@@ -72,6 +74,13 @@ if RUBY_VERSION =~ /^1.8/
72
74
t . verbose = true
73
75
t . rcov_opts = [ '--aggregate coverage.data' , '--text-summary' ]
74
76
end
77
+
78
+ Rcov ::RcovTask . new ( 'activerecord_provider' ) do |t |
79
+ t . libs << [ 'lib' , 'test/activerecord_provider' ]
80
+ t . pattern = 'test/activerecord_provider/tc_*.rb'
81
+ t . verbose = true
82
+ t . rcov_opts = [ '--aggregate coverage.data' , '--text-summary' ]
83
+ end
75
84
end
76
85
end
77
86
Original file line number Diff line number Diff line change 1
1
require 'rubygems'
2
+
3
+ if ENV [ 'COVERAGE' ] and RUBY_VERSION =~ /^1.9/
4
+ require 'simplecov'
5
+ require 'simplecov-rcov'
6
+
7
+ SimpleCov . formatter = SimpleCov ::Formatter ::RcovFormatter
8
+ SimpleCov . start
9
+ end
2
10
require 'test/unit'
3
11
require File . dirname ( __FILE__ ) + '/config/connection'
4
12
require File . dirname ( __FILE__ ) + '/helpers/providers'
Original file line number Diff line number Diff line change
1
+ if ENV [ 'COVERAGE' ] and RUBY_VERSION =~ /^1.9/
2
+ require 'simplecov'
3
+ require 'simplecov-rcov'
4
+
5
+ SimpleCov . formatter = SimpleCov ::Formatter ::RcovFormatter
6
+ SimpleCov . start
7
+ end
1
8
require 'oai'
2
9
require 'test/unit'
3
10
You can’t perform that action at this time.
0 commit comments