one_hundred_percent_coverage 0.0.1

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 ADDED
@@ -0,0 +1,57 @@
1
+ = one_hundred_percent_coverage
2
+
3
+ == DESCRIPTION
4
+
5
+ Useful lil gem to ensure 100% coverage of your tests. It uses the excellent
6
+ gem "simplecov" and only works for Ruby 1.9 (I think).
7
+
8
+ When included in your specs, it will output the HTML report to the "coverage"
9
+ directory.
10
+
11
+
12
+ == SYNOPSIS
13
+
14
+ In the Gemfile add...
15
+
16
+ gem 'one_hundred_percent_coverage', :git => 'git://github.com/moowahaha/one_hundred_percent_coverage', :group => :test
17
+
18
+ In the spec helper (usually spec/spec_helper.rb), add...
19
+
20
+ require 'one_hundred_percent_coverage'
21
+
22
+ Now tests will fail if they do not have 100% coverage.
23
+
24
+ Personally, I tend to include it in my spec_helpers conditionally, so single
25
+ test runs aren't affected. I do something like...
26
+
27
+ require 'one_hundred_percent_coverage' if ENV['with_coverage']
28
+
29
+
30
+ == REQUIREMENTS:
31
+
32
+ * Ruby 1.9
33
+ * simplecov
34
+
35
+ == LICENSE:
36
+
37
+ Copyright (c) 2010 Stephen Hardisty
38
+
39
+ Permission is hereby granted, free of charge, to any person obtaining
40
+ a copy of this software and associated documentation files (the
41
+ 'Software'), to deal in the Software without restriction, including
42
+ without limitation the rights to use, copy, modify, merge, publish,
43
+ distribute, sublicense, and/or sell copies of the Software, and to
44
+ permit persons to whom the Software is furnished to do so, subject to
45
+ the following conditions:
46
+
47
+ The above copyright notice and this permission notice shall be
48
+ included in all copies or substantial portions of the Software.
49
+
50
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
51
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
52
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
53
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
54
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
55
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
56
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
57
+
@@ -0,0 +1,12 @@
1
+ require 'simplecov'
2
+
3
+ SimpleCov.start
4
+
5
+ SimpleCov.at_exit do
6
+ SimpleCov.result.format!
7
+
8
+ if SimpleCov.result.covered_percent < 100.0
9
+ warn "Coverage is too low (#{SimpleCov.result.covered_percent})! Must be 100%."
10
+ exit 1
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: one_hundred_percent_coverage
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - Stephen Hardisty
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-12-11 00:00:00 +11:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: simplecov
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ - 3
31
+ - 7
32
+ version: 0.3.7
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: rubyforge
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ segments:
44
+ - 2
45
+ - 0
46
+ - 4
47
+ version: 2.0.4
48
+ type: :development
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
51
+ name: hoe
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
+ - 6
61
+ - 1
62
+ version: 2.6.1
63
+ type: :development
64
+ version_requirements: *id003
65
+ description: FIX (describe your package)
66
+ email:
67
+ - moowahaha@hotmail.com
68
+ executables: []
69
+
70
+ extensions: []
71
+
72
+ extra_rdoc_files: []
73
+
74
+ files:
75
+ - README.rdoc
76
+ - lib/one_hundred_percent_coverage.rb
77
+ has_rdoc: true
78
+ homepage: http://github.com/moowahaha/one_hundred_percent_coverage
79
+ licenses: []
80
+
81
+ post_install_message:
82
+ rdoc_options:
83
+ - --main
84
+ - README.rdoc
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ segments:
93
+ - 0
94
+ version: "0"
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ segments:
101
+ - 0
102
+ version: "0"
103
+ requirements: []
104
+
105
+ rubyforge_project: one_hundred_percent_coverage
106
+ rubygems_version: 1.3.7
107
+ signing_key:
108
+ specification_version: 3
109
+ summary: Handy thing to ensure 100% test coverage for Ruby 1.9 projects
110
+ test_files: []
111
+