simplecov 0.4.2 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -1
- data/.rvmrc +1 -1
- data/.travis.yml +9 -0
- data/CHANGELOG.md +64 -0
- data/Gemfile +7 -0
- data/README.rdoc +83 -66
- data/Rakefile +3 -7
- data/cucumber.yml +13 -0
- data/features/config_adapters.feature +44 -0
- data/features/config_autoload.feature +46 -0
- data/features/config_command_name.feature +33 -0
- data/features/config_coverage_dir.feature +20 -0
- data/features/config_deactivate_merging.feature +42 -0
- data/features/config_merge_timeout.feature +38 -0
- data/features/config_project_name.feature +27 -0
- data/features/config_styles.feature +93 -0
- data/features/cucumber_basic.feature +29 -0
- data/features/merging_test_unit_and_rspec.feature +44 -0
- data/features/rspec_basic.feature +31 -0
- data/features/rspec_groups_and_filters_basic.feature +29 -0
- data/features/rspec_groups_and_filters_complex.feature +35 -0
- data/features/rspec_without_simplecov.feature +20 -0
- data/features/step_definitions/html_steps.rb +42 -0
- data/features/step_definitions/simplecov_steps.rb +61 -0
- data/features/step_definitions/transformers.rb +13 -0
- data/features/step_definitions/web_steps.rb +64 -0
- data/features/support/env.rb +26 -0
- data/features/test_unit_basic.feature +34 -0
- data/features/test_unit_groups_and_filters_basic.feature +29 -0
- data/features/test_unit_groups_and_filters_complex.feature +35 -0
- data/features/test_unit_without_simplecov.feature +20 -0
- data/lib/simplecov.rb +15 -30
- data/lib/simplecov/adapters.rb +3 -26
- data/lib/simplecov/command_guesser.rb +2 -2
- data/lib/simplecov/configuration.rb +21 -21
- data/lib/simplecov/defaults.rb +48 -0
- data/lib/simplecov/file_list.rb +44 -0
- data/lib/simplecov/filter.rb +5 -5
- data/lib/simplecov/formatter.rb +1 -1
- data/lib/simplecov/formatter/simple_formatter.rb +1 -1
- data/lib/simplecov/jruby_float_fix.rb +1 -1
- data/lib/simplecov/merge_helpers.rb +4 -4
- data/lib/simplecov/result.rb +33 -30
- data/lib/simplecov/result_merger.rb +30 -13
- data/lib/simplecov/source_file.rb +78 -21
- data/lib/simplecov/version.rb +1 -1
- data/simplecov.gemspec +25 -22
- data/test/faked_project/Gemfile +6 -0
- data/test/faked_project/Rakefile +8 -0
- data/test/faked_project/cucumber.yml +13 -0
- data/test/faked_project/features/step_definitions/my_steps.rb +23 -0
- data/test/faked_project/features/support/env.rb +12 -0
- data/test/faked_project/features/test_stuff.feature +6 -0
- data/test/faked_project/lib/faked_project.rb +11 -0
- data/test/faked_project/lib/faked_project/framework_specific.rb +18 -0
- data/test/faked_project/lib/faked_project/meta_magic.rb +24 -0
- data/test/faked_project/lib/faked_project/some_class.rb +29 -0
- data/test/faked_project/spec/faked_spec.rb +11 -0
- data/test/faked_project/spec/meta_magic_spec.rb +10 -0
- data/test/faked_project/spec/some_class_spec.rb +10 -0
- data/test/faked_project/spec/spec_helper.rb +15 -0
- data/test/faked_project/test/faked_test.rb +11 -0
- data/test/faked_project/test/meta_magic_test.rb +13 -0
- data/test/faked_project/test/some_class_test.rb +15 -0
- data/test/faked_project/test/test_helper.rb +16 -0
- data/test/fixtures/app/controllers/sample_controller.rb +2 -2
- data/test/fixtures/app/models/user.rb +2 -2
- data/test/fixtures/frameworks/rspec_bad.rb +1 -1
- data/test/fixtures/frameworks/rspec_good.rb +1 -1
- data/test/fixtures/frameworks/testunit_bad.rb +1 -1
- data/test/fixtures/frameworks/testunit_good.rb +1 -1
- data/test/fixtures/resultset1.rb +1 -1
- data/test/fixtures/resultset2.rb +1 -1
- data/test/fixtures/sample.rb +8 -2
- data/test/helper.rb +17 -4
- data/test/shoulda_macros.rb +2 -2
- data/test/test_1_8_fallbacks.rb +3 -3
- data/test/test_command_guesser.rb +3 -3
- data/test/test_file_list.rb +24 -0
- data/test/test_filters.rb +18 -13
- data/test/test_merge_helpers.rb +23 -23
- data/test/test_result.rb +40 -31
- data/test/test_return_codes.rb +5 -5
- data/test/test_source_file.rb +39 -15
- data/test/test_source_file_line.rb +22 -22
- metadata +191 -53
- data/.document +0 -5
data/.gitignore
CHANGED
data/.rvmrc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rvm use 1.9.2
|
1
|
+
rvm use 1.9.2
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
v0.5.2 (2011-09-12)
|
2
|
+
===================
|
3
|
+
|
4
|
+
* Another fix for a bug in JSON processing introduced with MultiJSON in 0.5.1
|
5
|
+
(see https://github.com/colszowka/simplecov/pull/75, thanks @sferik)
|
6
|
+
|
7
|
+
v0.5.1 (2011-09-12)
|
8
|
+
===================
|
9
|
+
**Note: Yanked 2011-09-12 because the MultiJSON-patch had a crucial bug**
|
10
|
+
|
11
|
+
* Fix for invalid gemspec dependency string (see https://github.com/colszowka/simplecov/pull/70,
|
12
|
+
http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yacc.html, thanks @jspradlin)
|
13
|
+
|
14
|
+
* Added JSON in the form of the multi_json gem as dependency for those cases when built-in JSON
|
15
|
+
is unavailable (see https://github.com/colszowka/simplecov/issues/72
|
16
|
+
and https://github.com/colszowka/simplecov/pull/74, thanks @sferik)
|
17
|
+
|
18
|
+
v0.5.0 (2011-09-09)
|
19
|
+
===================
|
20
|
+
**Note: Yanked 2011-09-09 because of trouble with the gemspec.**
|
21
|
+
|
22
|
+
* JSON is now used instead of YAML for resultset caching (used for merging). Should resolve
|
23
|
+
a lot of problems people used to have because of YAML parser errors.
|
24
|
+
|
25
|
+
* There's a new adapter 'test_frameworks'. Use it outside of Rails to remove `test/`,
|
26
|
+
`spec/`, `features/` and `autotest/` dirs from your coverage reports, either directly
|
27
|
+
with `SimpleCov.start 'test_frameworks'` or with `SimpleCov.load_adapter 'test_frameworks'`
|
28
|
+
|
29
|
+
* SimpleCov configuration can now be placed centrally in a text file `.simplecov`, which will
|
30
|
+
be automatically read on `require 'simplecov'`. This makes using custom configuration like
|
31
|
+
groups and filters across your test suites much easier as you only have to specify your config
|
32
|
+
once. Just put the whole `SimpleCov.start (...)` code into `APP_ROOT/.simplecov`
|
33
|
+
|
34
|
+
* Lines can now be skipped by using the :nocov: flag in comments that wrap the code that should be
|
35
|
+
skipped, like in this example (thanks @phillipkoebbe)
|
36
|
+
|
37
|
+
<pre>
|
38
|
+
#:nocov:
|
39
|
+
def skipped
|
40
|
+
@foo * 2
|
41
|
+
end
|
42
|
+
#:nocov:
|
43
|
+
</pre>
|
44
|
+
|
45
|
+
* Moved file set coverage analytics from simplecov-html to SimpleCov::FileList, a new subclass
|
46
|
+
of Array that is always returned for SourceFile lists (i.e. in groups) and can now be used
|
47
|
+
in all formatters without the need to roll your own.
|
48
|
+
|
49
|
+
* The exceptions you used to get after removing some code and re-running your tests because SimpleCov
|
50
|
+
couldn't find the cached source lines should be resolved (thanks @goneflyin)
|
51
|
+
|
52
|
+
* Coverage strength metric: Average hits/line per source file and result group (thanks @trans)
|
53
|
+
|
54
|
+
* Finally, SimpleCov has an extensive Cucumber test suite
|
55
|
+
|
56
|
+
* Full compatibility with Ruby 1.9.3.preview1
|
57
|
+
|
58
|
+
HTML Formatter:
|
59
|
+
---------------
|
60
|
+
|
61
|
+
* The display of source files has been improved a lot. Weird scrolling trouble, out-of-scope line hit counts
|
62
|
+
and such should be a thing of the past. Also, it is prettier now.
|
63
|
+
* Source files are now syntax highlighted
|
64
|
+
* File paths no longer have that annoying './' in front of them
|
data/Gemfile
CHANGED
@@ -1,2 +1,9 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
gemspec
|
3
|
+
|
4
|
+
# Use local copy of simplecov-html in development when checked out
|
5
|
+
if File.directory?(File.dirname(__FILE__) + '/../simplecov-html')
|
6
|
+
gem 'simplecov-html', :path => File.dirname(__FILE__) + '/../simplecov-html'
|
7
|
+
else
|
8
|
+
gem 'simplecov-html', :git => 'https://github.com/colszowka/simplecov-html'
|
9
|
+
end
|
data/README.rdoc
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
-
= SimpleCov
|
1
|
+
= SimpleCov http://travis-ci.org/colszowka/simplecov.png
|
2
|
+
|
3
|
+
* Source code: https://github.com/colszowka/simplecov
|
4
|
+
* API documentation: http://rubydoc.info/gems/simplecov/frames
|
5
|
+
* Changelog: https://github.com/colszowka/simplecov/blob/master/CHANGELOG.md
|
6
|
+
* Rubygems: http://rubygems.org/gems/simplecov
|
2
7
|
|
3
8
|
SimpleCov is a code coverage analysis tool for Ruby 1.9. It uses 1.9's built-in Coverage library to gather code
|
4
|
-
coverage data, but makes processing
|
5
|
-
and display those results, thus giving you a complete code coverage suite that can be set up with just a couple lines of
|
9
|
+
coverage data, but makes processing its results much easier by providing a clean API to filter, group, merge, format
|
10
|
+
and display those results, thus giving you a complete code coverage suite that can be set up with just a couple lines of
|
6
11
|
code.
|
7
12
|
|
8
13
|
In most cases, you'll want overall coverage results for your projects, including all types of tests, cucumber features
|
@@ -16,7 +21,7 @@ automatically when you launch SimpleCov. If you're curious, you can find it at h
|
|
16
21
|
|
17
22
|
Update your Gemfile with this and do a bundle install:
|
18
23
|
|
19
|
-
gem 'simplecov', '>= 0.
|
24
|
+
gem 'simplecov', '>= 0.5.2', :require => false, :group => :test
|
20
25
|
|
21
26
|
Then, add the following to your test/test_helper.rb (right at the top, line 00) or spec_helper.rb or cucumber env.rb or whatever
|
22
27
|
test framework you prefer, really - just make sure simplecov is loaded and started BEFORE your app code is loaded:
|
@@ -48,7 +53,7 @@ Other test frameworks should work accordingly.
|
|
48
53
|
|
49
54
|
require 'simplecov'
|
50
55
|
SimpleCov.start 'rails'
|
51
|
-
|
56
|
+
|
52
57
|
You could even track what kind of code your UI testers are touching if you want to go overboard with things. SimpleCov does not
|
53
58
|
care what kind of framework it is running in, it just looks at what code is being executed and generates a report about it.
|
54
59
|
|
@@ -59,7 +64,7 @@ Configuration settings can be applied in three formats.
|
|
59
64
|
The 'direct' way:
|
60
65
|
|
61
66
|
SimpleCov.some_config_option 'foo'
|
62
|
-
|
67
|
+
|
63
68
|
Using a block:
|
64
69
|
|
65
70
|
SimpleCov.configure do
|
@@ -71,9 +76,25 @@ Using a block and automatically starting the coverage:
|
|
71
76
|
SimpleCov.start do
|
72
77
|
some_config_option 'foo'
|
73
78
|
end
|
74
|
-
|
79
|
+
|
75
80
|
Most times, you'll want to use the latter, so loading and setting up simplecov is in one place at the top of your test helper.
|
76
81
|
|
82
|
+
== Running coverage only on demand
|
83
|
+
|
84
|
+
The Ruby STDLIB Coverage library that SimpleCov builds upon is *very* fast (i.e. on a ~10 min Rails test suite, the speed drop was
|
85
|
+
only a couple seconds for me), and therefore it's SimpleCov's policy to just generate coverage every time you run your tests because
|
86
|
+
it doesn't do your test speed any harm and you're always equipped with the latest and greatest coverage results.
|
87
|
+
|
88
|
+
Because of this, SimpleCov has no explicit built-in mechanism to run coverage only on demand.
|
89
|
+
|
90
|
+
However, you can still accomplish this very easily by introducing a ENV variable conditional into your SimpleCov setup block, like this:
|
91
|
+
|
92
|
+
SimpleCov.start if ENV["COVERAGE"]
|
93
|
+
|
94
|
+
Then, SimpleCov will only run if you execute your tests like this:
|
95
|
+
|
96
|
+
$ COVERAGE=true rake test
|
97
|
+
|
77
98
|
== Filters
|
78
99
|
|
79
100
|
Filters can be used to remove selected files from your coverage data. By default, a filter is applied that removes all files
|
@@ -81,7 +102,7 @@ OUTSIDE of your project's root directory - otherwise you'd end up with a billion
|
|
81
102
|
gems you are using.
|
82
103
|
|
83
104
|
Of course you can define your own to remove things like configuration files, tests or whatever you don't need in your coverage
|
84
|
-
report.
|
105
|
+
report.
|
85
106
|
|
86
107
|
=== Defining custom filters
|
87
108
|
|
@@ -89,13 +110,13 @@ You can currently define a filter using either a String (that will then be Regex
|
|
89
110
|
a block or by passing in your own Filter class.
|
90
111
|
|
91
112
|
==== String filter
|
92
|
-
|
113
|
+
|
93
114
|
SimpleCov.start do
|
94
115
|
add_filter "/test/"
|
95
116
|
end
|
96
|
-
|
117
|
+
|
97
118
|
This simple string filter will remove all files that match "/test/" in their path.
|
98
|
-
|
119
|
+
|
99
120
|
==== Block filter
|
100
121
|
|
101
122
|
SimpleCov.start do
|
@@ -103,11 +124,11 @@ This simple string filter will remove all files that match "/test/" in their pat
|
|
103
124
|
source_file.lines.count < 5
|
104
125
|
end
|
105
126
|
end
|
106
|
-
|
127
|
+
|
107
128
|
Block filters receive a SimpleCov::SourceFile instance and expect your block to return either true (if the file is to be removed
|
108
129
|
from the result) or false (if the result should be kept). Please check out the RDoc for SimpleCov::SourceFile to learn about the
|
109
130
|
methods available to you. In the above example, the filter will remove all files that have less then 5 lines of code.
|
110
|
-
|
131
|
+
|
111
132
|
==== Custom filter class
|
112
133
|
|
113
134
|
class LineFilter < SimpleCov::Filter
|
@@ -115,9 +136,9 @@ methods available to you. In the above example, the filter will remove all files
|
|
115
136
|
source_file.lines.count < filter_argument
|
116
137
|
end
|
117
138
|
end
|
118
|
-
|
139
|
+
|
119
140
|
SimpleCov.add_filter LineFilter.new(5)
|
120
|
-
|
141
|
+
|
121
142
|
Defining your own filters is pretty easy: Just inherit from SimpleCov::Filter and define a method 'passes?(source_file)'. When running
|
122
143
|
the filter, a true return value from this method will result in the removal of the given source_file. The filter_argument method
|
123
144
|
is being set in the SimpleCov::Filter initialize method and thus is set to 5 in this example.
|
@@ -157,27 +178,27 @@ Simplecov tries to guess the name of the currently running test suite based upon
|
|
157
178
|
on (from v0.3.2+). This should work fine for Unit Tests, RSpec and Cucumber. If it fails, it will use the shell command
|
158
179
|
that invoked the test suite as a command name.
|
159
180
|
|
160
|
-
If you have some non-standard setup and still want nicely labeled test suites, you have to give Simplecov a cue what the
|
161
|
-
name of the currently running test suite is. You can do so by specifying SimpleCov.command_name in one test file that is
|
181
|
+
If you have some non-standard setup and still want nicely labeled test suites, you have to give Simplecov a cue what the
|
182
|
+
name of the currently running test suite is. You can do so by specifying SimpleCov.command_name in one test file that is
|
162
183
|
part of your specific suite.
|
163
184
|
|
164
185
|
So, to customize the suite names on a Rails app (yeah, sorry for being Rails biased, but everyone knows what
|
165
|
-
the structure of those projects is. You can apply this accordingly to the RSpecs in your Outlook-WebDAV-Calendar-Sync gem),
|
186
|
+
the structure of those projects is. You can apply this accordingly to the RSpecs in your Outlook-WebDAV-Calendar-Sync gem),
|
166
187
|
you could do something like this:
|
167
188
|
|
168
189
|
# test/unit/some_test.rb
|
169
190
|
SimpleCov.command_name 'test:units'
|
170
|
-
|
191
|
+
|
171
192
|
# test/functionals/some_controller_test.rb
|
172
193
|
SimpleCov.command_name "test:functionals"
|
173
|
-
|
194
|
+
|
174
195
|
# test/integration/some_integration_test.rb
|
175
196
|
SimpleCov.command_name "test:integration"
|
176
|
-
|
197
|
+
|
177
198
|
# features/steps/web_steps.rb
|
178
199
|
SimpleCov.command_name "features"
|
179
|
-
|
180
|
-
Note that this has only to be invoked ONCE PER TEST SUITE, so even if you have 200 unit test files, specifying it in
|
200
|
+
|
201
|
+
Note that this has only to be invoked ONCE PER TEST SUITE, so even if you have 200 unit test files, specifying it in
|
181
202
|
some_test.rb is fair enough.
|
182
203
|
|
183
204
|
simplecov-html prints the used test suites in the footer of the generated coverage report.
|
@@ -195,32 +216,32 @@ You can deactivate merging altogether with "SimpleCov.use_merging false".
|
|
195
216
|
|
196
217
|
By default, Simplecov's only config assumption is that you only want coverage reports for files inside your project
|
197
218
|
root. To save you from repetitive configuration, you can use predefined blocks of configuration, called 'adapters',
|
198
|
-
or define your own.
|
219
|
+
or define your own.
|
199
220
|
|
200
|
-
You can then pass the name of the adapter to be used as the first argument to SimpleCov.start. For example, simplecov
|
221
|
+
You can then pass the name of the adapter to be used as the first argument to SimpleCov.start. For example, simplecov
|
201
222
|
comes bundled with a 'rails' adapter. It looks somewhat like this:
|
202
223
|
|
203
224
|
SimpleCov.adapters.define 'rails' do
|
204
225
|
add_filter '/test/'
|
205
226
|
add_filter '/config/'
|
206
|
-
|
227
|
+
|
207
228
|
add_group 'Controllers', 'app/controllers'
|
208
229
|
add_group 'Models', 'app/models'
|
209
230
|
add_group 'Helpers', 'app/helpers'
|
210
231
|
add_group 'Libraries', 'lib'
|
211
232
|
add_group 'Plugins', 'vendor/plugins'
|
212
233
|
end
|
213
|
-
|
234
|
+
|
214
235
|
As you can see, it's just a glorified SimpleCov.configure block. In your test_helper.rb, launch simplecov with:
|
215
236
|
|
216
237
|
SimpleCov.start 'rails'
|
217
|
-
|
238
|
+
|
218
239
|
OR
|
219
240
|
|
220
241
|
SimpleCov.start 'rails' do
|
221
242
|
# additional config here
|
222
243
|
end
|
223
|
-
|
244
|
+
|
224
245
|
=== Custom adapters
|
225
246
|
|
226
247
|
You can load additional adapters with the SimpleCov.load_adapter('xyz') method. This allows you to build upon an existing
|
@@ -232,15 +253,15 @@ adapter and customize it so you can reuse it in unit tests and cucumber features
|
|
232
253
|
load_adapter 'rails'
|
233
254
|
add_filter 'vendor' # Don't include vendored stuff
|
234
255
|
end
|
235
|
-
|
256
|
+
|
236
257
|
# features/support/env.rb
|
237
258
|
require 'simplecov_custom_adapter'
|
238
259
|
SimpleCov.start 'myadapter'
|
239
|
-
|
260
|
+
|
240
261
|
# test/test_helper.rb
|
241
262
|
require 'simplecov_custom_adapter'
|
242
263
|
SimpleCov.start 'myadapter'
|
243
|
-
|
264
|
+
|
244
265
|
== Customizing exit behaviour
|
245
266
|
|
246
267
|
You can define what simplecov should do when your test suite finishes by customizing the at_exit hook:
|
@@ -248,16 +269,16 @@ You can define what simplecov should do when your test suite finishes by customi
|
|
248
269
|
SimpleCov.at_exit do
|
249
270
|
SimpleCov.result.format!
|
250
271
|
end
|
251
|
-
|
272
|
+
|
252
273
|
Above is the default behaviour. Do whatever you like instead!
|
253
274
|
|
254
275
|
== Using your own formatter
|
255
276
|
|
256
|
-
You can use your own formatter with:
|
277
|
+
You can use your own formatter with:
|
257
278
|
|
258
279
|
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
|
259
280
|
|
260
|
-
When calling SimpleCov.result.format!, it will be invoked with SimpleCov::Formatter::YourFormatter.new.format(result), "result"
|
281
|
+
When calling SimpleCov.result.format!, it will be invoked with SimpleCov::Formatter::YourFormatter.new.format(result), "result"
|
261
282
|
being an instance of SimpleCov::Result. Do whatever your wish with that!
|
262
283
|
|
263
284
|
== Using multiple formatters
|
@@ -274,21 +295,21 @@ There is currently no built-in support for this, but you could help yourself wit
|
|
274
295
|
Then configure the formatter to use the new merger:
|
275
296
|
|
276
297
|
SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter
|
277
|
-
|
298
|
+
|
278
299
|
== Available formatters
|
279
300
|
|
280
301
|
Apart from the direct companion simplecov-html (https://github.com/colszowka/simplecov-html), there are other formatters
|
281
302
|
available:
|
282
303
|
|
283
|
-
==== simplecov_rcov
|
284
|
-
by Fernando Guillen
|
304
|
+
==== simplecov_rcov
|
305
|
+
by Fernando Guillen
|
285
306
|
|
286
307
|
https://github.com/fguillen/simplecov-rcov
|
287
308
|
|
288
309
|
"The target of this formatter is to cheat on Hudson so I can use the Ruby metrics plugin with SimpleCov."
|
289
310
|
|
290
|
-
==== simplecov_csv
|
291
|
-
by Fernando Guillen
|
311
|
+
==== simplecov_csv
|
312
|
+
by Fernando Guillen
|
292
313
|
|
293
314
|
https://github.com/fguillen/simplecov-csv
|
294
315
|
|
@@ -296,44 +317,40 @@ CSV formatter for SimpleCov code coverage tool for ruby 1.9+
|
|
296
317
|
|
297
318
|
== Configuration options
|
298
319
|
|
299
|
-
|
300
|
-
|
301
|
-
The root directory for the project coverage is being generated for. This defaults to the current working directory
|
302
|
-
and should be just fine. Note that by default, all files outside of root will be filtered and thus not included in your
|
303
|
-
coverage report, so you'll probably rarely want to adjust this setting other than specifying an absolute path here.
|
304
|
-
|
305
|
-
=== SimpleCov.coverage_dir 'coverage'
|
306
|
-
|
307
|
-
The name of the subdirectory of root that coverage will be generated to. Defaults to 'coverage'.
|
308
|
-
|
309
|
-
=== ...TODO...
|
320
|
+
Please have a look at our documentation[http://rubydoc.info/gems/simplecov/frames], specifically the Configuration class.
|
310
321
|
|
311
322
|
== Kudos
|
312
323
|
|
313
324
|
Thanks to Aaron Patterson (http://engineering.attinteractive.com/2010/08/code-coverage-in-ruby-1-9/) for the original idea
|
314
325
|
for this!
|
315
326
|
|
316
|
-
==
|
327
|
+
== Ruby version compatibility
|
328
|
+
|
329
|
+
http://travis-ci.org/colszowka/simplecov.png
|
330
|
+
|
331
|
+
Only Ruby 1.9+ ships with the coverage library that SimpleCov depends upon. SimpleCov is built against various other Rubies,
|
332
|
+
including Rubinius and JRuby, in {continuous integration}[http://travis-ci.org/colszowka/simplecov], but this happens only to
|
333
|
+
ensure that SimpleCov does not make your test suite crash right now. Whether SimpleCov will support JRuby/Rubinius in the future
|
334
|
+
depends solely on whether those Ruby interpreters add the coverage library.
|
317
335
|
|
318
|
-
|
336
|
+
SimpleCov is built in {continuous integration}[http://travis-ci.org/colszowka/simplecov] on 1.8.6, 1.8.7, 1.9.2, ree, ruby-head,
|
337
|
+
rbx and jruby.
|
319
338
|
|
320
|
-
==
|
339
|
+
== Contributions
|
321
340
|
|
322
|
-
|
341
|
+
To fetch & test the library for development, do:
|
323
342
|
|
324
|
-
|
343
|
+
$ git clone https://github.com/colszowka/simplecov
|
344
|
+
$ cd simplecov
|
345
|
+
$ bundle
|
346
|
+
$ bundle exec rake test && bundle exec cucumber features
|
325
347
|
|
326
|
-
|
348
|
+
If you wont to contribute, please:
|
327
349
|
|
328
|
-
|
329
|
-
|
330
|
-
*
|
331
|
-
*
|
332
|
-
* Add tests for it. This is important so I don't break it in a
|
333
|
-
future version unintentionally.
|
334
|
-
* Commit, do not mess with rakefile, version, or history.
|
335
|
-
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
336
|
-
* Send me a pull request. Bonus points for topic branches.
|
350
|
+
* Fork the project.
|
351
|
+
* Make your feature addition or bug fix.
|
352
|
+
* Add tests for it. This is important so I don't break it in a future version unintentionally.
|
353
|
+
* Send me a pull request on Github.
|
337
354
|
|
338
355
|
== Copyright
|
339
356
|
|
data/Rakefile
CHANGED
@@ -4,15 +4,11 @@ Bundler::GemHelper.install_tasks
|
|
4
4
|
require 'rake/testtask'
|
5
5
|
Rake::TestTask.new(:test) do |test|
|
6
6
|
test.libs << 'lib' << 'test'
|
7
|
-
test.
|
7
|
+
test.test_files = FileList['test/test_*.rb']
|
8
8
|
test.verbose = true
|
9
9
|
end
|
10
10
|
|
11
11
|
task :default => :test
|
12
12
|
|
13
|
-
require 'rake/
|
14
|
-
Rake::
|
15
|
-
rdoc.rdoc_dir = 'rdoc'
|
16
|
-
rdoc.rdoc_files.include('README*')
|
17
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
18
|
-
end
|
13
|
+
require 'cucumber/rake/task'
|
14
|
+
Cucumber::Rake::Task.new
|