rcov_rails 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +10 -2
- data/lib/tasks/coverage.rake +8 -2
- metadata +5 -5
data/README
CHANGED
@@ -13,9 +13,10 @@ Install as a Rails 3 Gem:
|
|
13
13
|
$: vim Gemfile
|
14
14
|
|
15
15
|
group :development do
|
16
|
-
|
16
|
+
gem "rcov_rails"
|
17
17
|
end
|
18
18
|
|
19
|
+
$: bundle install
|
19
20
|
$: rake test:coverage # boom!
|
20
21
|
|
21
22
|
Install as a Rails 2.x Plugin:
|
@@ -24,9 +25,16 @@ Install as a Rails 2.x Plugin:
|
|
24
25
|
$: ruby script/plugin install git://github.com/matthewrudy/rcov_rails
|
25
26
|
$: rake test:coverage # boom!
|
26
27
|
|
27
|
-
Install as a Rails 3.x Plugin:
|
28
|
+
Install as a Rails 3.x Plugin: // I suggest you don't do this, as you'll need to add rcov via bundler anyway
|
28
29
|
|
29
30
|
$: sudo gem install rcov
|
31
|
+
$: vim Gemfile
|
32
|
+
|
33
|
+
group :development do
|
34
|
+
gem "rcov"
|
35
|
+
end
|
36
|
+
|
37
|
+
$: bundle install
|
30
38
|
$: rails plugin install git://github.com/matthewrudy/rcov_rails
|
31
39
|
$: rake test:coverage # boom!
|
32
40
|
|
data/lib/tasks/coverage.rake
CHANGED
@@ -19,7 +19,7 @@ begin
|
|
19
19
|
desc(task_description)
|
20
20
|
|
21
21
|
task name => ["test:coverage:reset"] + aspect_tasks + ["test:coverage:generate"] do
|
22
|
-
if
|
22
|
+
if defined?(RUBY_PLATFORM) && RUBY_PLATFORM['darwin']
|
23
23
|
system("open coverage/index.html")
|
24
24
|
else
|
25
25
|
puts "coverage created. open coverage/index.html in a web browser"
|
@@ -30,9 +30,15 @@ begin
|
|
30
30
|
namespace :test do
|
31
31
|
|
32
32
|
namespace :coverage do
|
33
|
+
|
34
|
+
task_dependencies = []
|
35
|
+
|
36
|
+
if defined?(ActiveRecord)
|
37
|
+
task_dependencies << "db:test:prepare"
|
38
|
+
end
|
33
39
|
|
34
40
|
["units", "functionals", "integration"].each do |scope|
|
35
|
-
RcovRails::RcovTask.new("_#{scope}" =>
|
41
|
+
RcovRails::RcovTask.new("_#{scope}" => task_dependencies) do |t|
|
36
42
|
t.libs << "test"
|
37
43
|
t.test_files = Dir["test/#{scope.singularize}/**/*_test.rb"]
|
38
44
|
t.add_descriptions = false
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcov_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matthew Rudy Jacobs
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-08-20 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|