simplecov 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +1 -1
- data/Rakefile +3 -2
- data/VERSION +1 -1
- data/lib/simplecov.rb +4 -0
- data/simplecov.gemspec +16 -3
- data/test/fixtures/frameworks/rspec_bad.rb +9 -0
- data/test/fixtures/frameworks/rspec_good.rb +9 -0
- data/test/fixtures/frameworks/testunit_bad.rb +9 -0
- data/test/fixtures/frameworks/testunit_good.rb +9 -0
- data/test/test_return_codes.rb +37 -0
- metadata +31 -4
data/README.rdoc
CHANGED
@@ -15,7 +15,7 @@ when you do gem install simplecov. You can find it at http://github.com/colszowk
|
|
15
15
|
|
16
16
|
Update your Gemfile with this and do a bundle install:
|
17
17
|
group :test do
|
18
|
-
gem 'simplecov', '>= 0.3.
|
18
|
+
gem 'simplecov', '>= 0.3.5', :require => false # Will install simplecov-html as a dependency
|
19
19
|
end
|
20
20
|
|
21
21
|
Then, add the following to your Rails test/test_helper.rb (right at the top, line 00):
|
data/Rakefile
CHANGED
@@ -7,11 +7,12 @@ begin
|
|
7
7
|
gem.name = "simplecov"
|
8
8
|
gem.summary = %Q{Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites}
|
9
9
|
gem.description = %Q{Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites}
|
10
|
-
gem.email = "christoph at olszowka
|
10
|
+
gem.email = "christoph at olszowka de"
|
11
11
|
gem.homepage = "http://github.com/colszowka/simplecov"
|
12
12
|
gem.authors = ["Christoph Olszowka"]
|
13
13
|
gem.add_dependency 'simplecov-html', ">= 0.3.7"
|
14
|
-
gem.add_development_dependency "shoulda", "
|
14
|
+
gem.add_development_dependency "shoulda", "2.10.3"
|
15
|
+
gem.add_development_dependency "rspec", "~> 2.0.0.beta.20"
|
15
16
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
17
|
end
|
17
18
|
Jeweler::GemcutterTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.5
|
data/lib/simplecov.rb
CHANGED
@@ -92,6 +92,7 @@ module SimpleCov
|
|
92
92
|
def load_adapter(name)
|
93
93
|
adapters.load(name)
|
94
94
|
end
|
95
|
+
|
95
96
|
end
|
96
97
|
end
|
97
98
|
|
@@ -116,5 +117,8 @@ SimpleCov.configure do
|
|
116
117
|
end
|
117
118
|
|
118
119
|
at_exit do
|
120
|
+
# Store the exit status of the test run since it goes away after calling the at_exit proc...
|
121
|
+
@exit_status = $!.status if $!.is_a?(SystemExit)
|
119
122
|
SimpleCov.at_exit.call
|
123
|
+
exit @exit_status if @exit_status # Force exit with stored status (see github issue #5)
|
120
124
|
end
|
data/simplecov.gemspec
CHANGED
@@ -5,13 +5,13 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{simplecov}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Christoph Olszowka"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-09-03}
|
13
13
|
s.description = %q{Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites}
|
14
|
-
s.email = %q{christoph at olszowka
|
14
|
+
s.email = %q{christoph at olszowka de}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
17
|
"README.rdoc"
|
@@ -37,6 +37,10 @@ Gem::Specification.new do |s|
|
|
37
37
|
"simplecov.gemspec",
|
38
38
|
"test/fixtures/app/controllers/sample_controller.rb",
|
39
39
|
"test/fixtures/app/models/user.rb",
|
40
|
+
"test/fixtures/frameworks/rspec_bad.rb",
|
41
|
+
"test/fixtures/frameworks/rspec_good.rb",
|
42
|
+
"test/fixtures/frameworks/testunit_bad.rb",
|
43
|
+
"test/fixtures/frameworks/testunit_good.rb",
|
40
44
|
"test/fixtures/resultset1.rb",
|
41
45
|
"test/fixtures/resultset2.rb",
|
42
46
|
"test/fixtures/sample.rb",
|
@@ -45,6 +49,7 @@ Gem::Specification.new do |s|
|
|
45
49
|
"test/test_filters.rb",
|
46
50
|
"test/test_merge_helpers.rb",
|
47
51
|
"test/test_result.rb",
|
52
|
+
"test/test_return_codes.rb",
|
48
53
|
"test/test_source_file.rb",
|
49
54
|
"test/test_source_file_line.rb"
|
50
55
|
]
|
@@ -56,6 +61,10 @@ Gem::Specification.new do |s|
|
|
56
61
|
s.test_files = [
|
57
62
|
"test/fixtures/app/controllers/sample_controller.rb",
|
58
63
|
"test/fixtures/app/models/user.rb",
|
64
|
+
"test/fixtures/frameworks/rspec_bad.rb",
|
65
|
+
"test/fixtures/frameworks/rspec_good.rb",
|
66
|
+
"test/fixtures/frameworks/testunit_bad.rb",
|
67
|
+
"test/fixtures/frameworks/testunit_good.rb",
|
59
68
|
"test/fixtures/resultset1.rb",
|
60
69
|
"test/fixtures/resultset2.rb",
|
61
70
|
"test/fixtures/sample.rb",
|
@@ -64,6 +73,7 @@ Gem::Specification.new do |s|
|
|
64
73
|
"test/test_filters.rb",
|
65
74
|
"test/test_merge_helpers.rb",
|
66
75
|
"test/test_result.rb",
|
76
|
+
"test/test_return_codes.rb",
|
67
77
|
"test/test_source_file.rb",
|
68
78
|
"test/test_source_file_line.rb"
|
69
79
|
]
|
@@ -75,13 +85,16 @@ Gem::Specification.new do |s|
|
|
75
85
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
76
86
|
s.add_runtime_dependency(%q<simplecov-html>, [">= 0.3.7"])
|
77
87
|
s.add_development_dependency(%q<shoulda>, ["= 2.10.3"])
|
88
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.0.0.beta.20"])
|
78
89
|
else
|
79
90
|
s.add_dependency(%q<simplecov-html>, [">= 0.3.7"])
|
80
91
|
s.add_dependency(%q<shoulda>, ["= 2.10.3"])
|
92
|
+
s.add_dependency(%q<rspec>, ["~> 2.0.0.beta.20"])
|
81
93
|
end
|
82
94
|
else
|
83
95
|
s.add_dependency(%q<simplecov-html>, [">= 0.3.7"])
|
84
96
|
s.add_dependency(%q<shoulda>, ["= 2.10.3"])
|
97
|
+
s.add_dependency(%q<rspec>, ["~> 2.0.0.beta.20"])
|
85
98
|
end
|
86
99
|
end
|
87
100
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
# Make sure that exit codes of tests are propagated properly when using
|
4
|
+
# simplecov. See github issue #5
|
5
|
+
class TestReturnCodes < Test::Unit::TestCase
|
6
|
+
context "Inside fixtures/frameworks" do
|
7
|
+
setup do
|
8
|
+
@current_dir = Dir.getwd
|
9
|
+
Dir.chdir(File.join(File.dirname(__FILE__), 'fixtures', 'frameworks'))
|
10
|
+
FileUtils.rm_rf('./coverage')
|
11
|
+
end
|
12
|
+
|
13
|
+
should "have return code 0 when running testunit_good.rb" do
|
14
|
+
`ruby testunit_good.rb`
|
15
|
+
assert_equal 0, $?.exitstatus
|
16
|
+
end
|
17
|
+
|
18
|
+
should "have return code 0 when running rspec_good.rb" do
|
19
|
+
`ruby rspec_good.rb`
|
20
|
+
assert_equal 0, $?.exitstatus
|
21
|
+
end
|
22
|
+
|
23
|
+
should "have return code 1 when running testunit_bad.rb" do
|
24
|
+
`ruby testunit_bad.rb`
|
25
|
+
assert_equal 1, $?.exitstatus
|
26
|
+
end
|
27
|
+
|
28
|
+
should "have return code 1 when running rspec_bad.rb" do
|
29
|
+
`ruby rspec_bad.rb`
|
30
|
+
assert_equal 1, $?.exitstatus
|
31
|
+
end
|
32
|
+
|
33
|
+
teardown do
|
34
|
+
Dir.chdir(@current_dir)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 5
|
9
|
+
version: 0.3.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Christoph Olszowka
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-09-03 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -47,8 +47,25 @@ dependencies:
|
|
47
47
|
version: 2.10.3
|
48
48
|
type: :development
|
49
49
|
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: rspec
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ~>
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
segments:
|
59
|
+
- 2
|
60
|
+
- 0
|
61
|
+
- 0
|
62
|
+
- beta
|
63
|
+
- 20
|
64
|
+
version: 2.0.0.beta.20
|
65
|
+
type: :development
|
66
|
+
version_requirements: *id003
|
50
67
|
description: Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites
|
51
|
-
email: christoph at olszowka
|
68
|
+
email: christoph at olszowka de
|
52
69
|
executables: []
|
53
70
|
|
54
71
|
extensions: []
|
@@ -77,6 +94,10 @@ files:
|
|
77
94
|
- simplecov.gemspec
|
78
95
|
- test/fixtures/app/controllers/sample_controller.rb
|
79
96
|
- test/fixtures/app/models/user.rb
|
97
|
+
- test/fixtures/frameworks/rspec_bad.rb
|
98
|
+
- test/fixtures/frameworks/rspec_good.rb
|
99
|
+
- test/fixtures/frameworks/testunit_bad.rb
|
100
|
+
- test/fixtures/frameworks/testunit_good.rb
|
80
101
|
- test/fixtures/resultset1.rb
|
81
102
|
- test/fixtures/resultset2.rb
|
82
103
|
- test/fixtures/sample.rb
|
@@ -85,6 +106,7 @@ files:
|
|
85
106
|
- test/test_filters.rb
|
86
107
|
- test/test_merge_helpers.rb
|
87
108
|
- test/test_result.rb
|
109
|
+
- test/test_return_codes.rb
|
88
110
|
- test/test_source_file.rb
|
89
111
|
- test/test_source_file_line.rb
|
90
112
|
has_rdoc: true
|
@@ -122,6 +144,10 @@ summary: Code coverage for Ruby 1.9 with a powerful configuration library and au
|
|
122
144
|
test_files:
|
123
145
|
- test/fixtures/app/controllers/sample_controller.rb
|
124
146
|
- test/fixtures/app/models/user.rb
|
147
|
+
- test/fixtures/frameworks/rspec_bad.rb
|
148
|
+
- test/fixtures/frameworks/rspec_good.rb
|
149
|
+
- test/fixtures/frameworks/testunit_bad.rb
|
150
|
+
- test/fixtures/frameworks/testunit_good.rb
|
125
151
|
- test/fixtures/resultset1.rb
|
126
152
|
- test/fixtures/resultset2.rb
|
127
153
|
- test/fixtures/sample.rb
|
@@ -130,5 +156,6 @@ test_files:
|
|
130
156
|
- test/test_filters.rb
|
131
157
|
- test/test_merge_helpers.rb
|
132
158
|
- test/test_result.rb
|
159
|
+
- test/test_return_codes.rb
|
133
160
|
- test/test_source_file.rb
|
134
161
|
- test/test_source_file_line.rb
|