rspec-core 3.8.0 → 3.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +22 -0
- data/README.md +14 -14
- data/lib/rspec/core/configuration.rb +21 -2
- data/lib/rspec/core/example.rb +4 -1
- data/lib/rspec/core/example_group.rb +5 -1
- data/lib/rspec/core/formatters/exception_presenter.rb +12 -1
- data/lib/rspec/core/memoized_helpers.rb +20 -1
- data/lib/rspec/core/metadata.rb +1 -2
- data/lib/rspec/core/version.rb +1 -1
- metadata +10 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f10137b78862f926840a5956452d1def7be1715745bb73edab35b73af27cd801
|
4
|
+
data.tar.gz: 7d2c59eea23bd759487efb177c7e9de131a416d832ee6467b4849813d759832c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4344a9bdf65524dc82da9368cc8d844ed1da304aa139f2a95d5a6f1c177534d95ebbf7ecd3a488c2fa65221706cf0f4afdfbfdc3d0b6846f18ffaff1b9cda17
|
7
|
+
data.tar.gz: 063aee16e467179dd13d1f94a98b57fbc135d93ab9b46cf0d860903ca8a5ce130579830e6f561b288a78f642da976ac56be5ccf3ec4753d8754e2d508e650cb0
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,3 +1,25 @@
|
|
1
|
+
### 3.8.2 / 2019-06-29
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.8.1...v3.8.2)
|
3
|
+
|
4
|
+
Bug Fixes:
|
5
|
+
|
6
|
+
* Fix `config.define_derived_metadata` so that cascades are not triggered
|
7
|
+
until metadata has been assigned to the example or example group
|
8
|
+
(Myron Marston, #2635).
|
9
|
+
|
10
|
+
### 3.8.1 / 2019-06-13
|
11
|
+
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.8.0...3.8.1)
|
12
|
+
|
13
|
+
Bug Fixes:
|
14
|
+
|
15
|
+
* Handle RSpec description(s) with japanese chars in CP932 encoded files.
|
16
|
+
(Benoit Tigeot, #2575)
|
17
|
+
* When defining `let` methods that overwrite an existing method, prevent
|
18
|
+
a warning being issued by removing the old definition. (Jon Rowe, #2593)
|
19
|
+
* Prevent warning on Ruby 2.6.0-rc1 (Keiji Yoshimi, #2582)
|
20
|
+
* Fix `config.define_derived_metadata` so that it supports cascades.
|
21
|
+
(Myron Marston, #2630).
|
22
|
+
|
1
23
|
### 3.8.0 / 2018-08-04
|
2
24
|
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.7.1...v3.8.0)
|
3
25
|
|
data/README.md
CHANGED
@@ -19,20 +19,6 @@ RSpec repos as well. Add the following to your `Gemfile`:
|
|
19
19
|
end
|
20
20
|
```
|
21
21
|
|
22
|
-
## Contributing
|
23
|
-
|
24
|
-
Once you've set up the environment, you'll need to cd into the working
|
25
|
-
directory of whichever repo you want to work in. From there you can run the
|
26
|
-
specs and cucumber features, and make patches.
|
27
|
-
|
28
|
-
NOTE: You do not need to use rspec-dev to work on a specific RSpec repo. You
|
29
|
-
can treat each RSpec repo as an independent project.
|
30
|
-
|
31
|
-
* [Build details](BUILD_DETAIL.md)
|
32
|
-
* [Code of Conduct](CODE_OF_CONDUCT.md)
|
33
|
-
* [Detailed contributing guide](CONTRIBUTING.md)
|
34
|
-
* [Development setup guide](DEVELOPMENT.md)
|
35
|
-
|
36
22
|
## Basic Structure
|
37
23
|
|
38
24
|
RSpec uses the words "describe" and "it" so we can express concepts like a conversation:
|
@@ -376,6 +362,20 @@ Finished in 0.000379 seconds
|
|
376
362
|
1 example, 0 failures
|
377
363
|
```
|
378
364
|
|
365
|
+
## Contributing
|
366
|
+
|
367
|
+
Once you've set up the environment, you'll need to cd into the working
|
368
|
+
directory of whichever repo you want to work in. From there you can run the
|
369
|
+
specs and cucumber features, and make patches.
|
370
|
+
|
371
|
+
NOTE: You do not need to use rspec-dev to work on a specific RSpec repo. You
|
372
|
+
can treat each RSpec repo as an independent project.
|
373
|
+
|
374
|
+
* [Build details](BUILD_DETAIL.md)
|
375
|
+
* [Code of Conduct](CODE_OF_CONDUCT.md)
|
376
|
+
* [Detailed contributing guide](CONTRIBUTING.md)
|
377
|
+
* [Development setup guide](DEVELOPMENT.md)
|
378
|
+
|
379
379
|
## Also see
|
380
380
|
|
381
381
|
* [https://github.com/rspec/rspec](https://github.com/rspec/rspec)
|
@@ -1855,9 +1855,28 @@ module RSpec
|
|
1855
1855
|
|
1856
1856
|
# @private
|
1857
1857
|
def apply_derived_metadata_to(metadata)
|
1858
|
-
|
1859
|
-
|
1858
|
+
already_run_blocks = Set.new
|
1859
|
+
|
1860
|
+
# We loop and attempt to re-apply metadata blocks to support cascades
|
1861
|
+
# (e.g. where a derived bit of metadata triggers the application of
|
1862
|
+
# another piece of derived metadata, etc)
|
1863
|
+
#
|
1864
|
+
# We limit our looping to 200 times as a way to detect infinitely recursing derived metadata blocks.
|
1865
|
+
# It's hard to imagine a valid use case for a derived metadata cascade greater than 200 iterations.
|
1866
|
+
200.times do
|
1867
|
+
return if @derived_metadata_blocks.items_for(metadata).all? do |block|
|
1868
|
+
already_run_blocks.include?(block).tap do |skip_block|
|
1869
|
+
block.call(metadata) unless skip_block
|
1870
|
+
already_run_blocks << block
|
1871
|
+
end
|
1872
|
+
end
|
1860
1873
|
end
|
1874
|
+
|
1875
|
+
# If we got here, then `@derived_metadata_blocks.items_for(metadata).all?` never returned
|
1876
|
+
# `true` above and we treat this as an attempt to recurse infinitely. It's better to fail
|
1877
|
+
# with a clear # error than hang indefinitely, which is what would happen if we didn't limit
|
1878
|
+
# the looping above.
|
1879
|
+
raise SystemStackError, "Attempted to recursively derive metadata indefinitely."
|
1861
1880
|
end
|
1862
1881
|
|
1863
1882
|
# Defines a `before` hook. See {Hooks#before} for full docs.
|
data/lib/rspec/core/example.rb
CHANGED
@@ -203,10 +203,13 @@ module RSpec
|
|
203
203
|
description, example_block
|
204
204
|
)
|
205
205
|
|
206
|
+
config = RSpec.configuration
|
207
|
+
config.apply_derived_metadata_to(@metadata)
|
208
|
+
|
206
209
|
# This should perhaps be done in `Metadata::ExampleHash.create`,
|
207
210
|
# but the logic there has no knowledge of `RSpec.world` and we
|
208
211
|
# want to keep it that way. It's easier to just assign it here.
|
209
|
-
@metadata[:last_run_status] =
|
212
|
+
@metadata[:last_run_status] = config.last_run_statuses[id]
|
210
213
|
|
211
214
|
@example_group_instance = @exception = nil
|
212
215
|
@clock = RSpec::Core::Time
|
@@ -424,11 +424,15 @@ module RSpec
|
|
424
424
|
superclass.method(:next_runnable_index_for),
|
425
425
|
description, *args, &example_group_block
|
426
426
|
)
|
427
|
+
|
428
|
+
config = RSpec.configuration
|
429
|
+
config.apply_derived_metadata_to(@metadata)
|
430
|
+
|
427
431
|
ExampleGroups.assign_const(self)
|
428
432
|
|
429
433
|
@currently_executing_a_context_hook = false
|
430
434
|
|
431
|
-
|
435
|
+
config.configure_group(self)
|
432
436
|
end
|
433
437
|
|
434
438
|
# @private
|
@@ -81,7 +81,7 @@ module RSpec
|
|
81
81
|
|
82
82
|
def fully_formatted_lines(failure_number, colorizer)
|
83
83
|
lines = [
|
84
|
-
description,
|
84
|
+
encoded_description(description),
|
85
85
|
detail_formatter.call(example, colorizer),
|
86
86
|
formatted_message_and_backtrace(colorizer),
|
87
87
|
extra_detail_formatter.call(failure_number, colorizer),
|
@@ -244,6 +244,17 @@ module RSpec
|
|
244
244
|
end
|
245
245
|
end
|
246
246
|
|
247
|
+
if String.method_defined?(:encoding)
|
248
|
+
def encoded_description(description)
|
249
|
+
return if description.nil?
|
250
|
+
encoded_string(description)
|
251
|
+
end
|
252
|
+
else # for 1.8.7
|
253
|
+
def encoded_description(description)
|
254
|
+
description
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
247
258
|
def exception_backtrace
|
248
259
|
exception.backtrace || []
|
249
260
|
end
|
@@ -288,7 +288,26 @@ EOS
|
|
288
288
|
raise(
|
289
289
|
"#let or #subject called with a reserved name #initialize"
|
290
290
|
) if :initialize == name
|
291
|
-
MemoizedHelpers.module_for(self)
|
291
|
+
our_module = MemoizedHelpers.module_for(self)
|
292
|
+
|
293
|
+
# If we have a module clash in our helper module
|
294
|
+
# then we need to remove it to prevent a warning.
|
295
|
+
#
|
296
|
+
# Note we do not check ancestor modules (see: `instance_methods(false)`)
|
297
|
+
# as we can override them.
|
298
|
+
if our_module.instance_methods(false).include?(name)
|
299
|
+
our_module.__send__(:remove_method, name)
|
300
|
+
end
|
301
|
+
our_module.__send__(:define_method, name, &block)
|
302
|
+
|
303
|
+
# If we have a module clash in the example module
|
304
|
+
# then we need to remove it to prevent a warning.
|
305
|
+
#
|
306
|
+
# Note we do not check ancestor modules (see: `instance_methods(false)`)
|
307
|
+
# as we can override them.
|
308
|
+
if instance_methods(false).include?(name)
|
309
|
+
remove_method(name)
|
310
|
+
end
|
292
311
|
|
293
312
|
# Apply the memoization. The method has been defined in an ancestor
|
294
313
|
# module so we can use `super` here to get the value.
|
data/lib/rspec/core/metadata.rb
CHANGED
@@ -136,7 +136,6 @@ module RSpec
|
|
136
136
|
|
137
137
|
populate_location_attributes
|
138
138
|
metadata.update(user_metadata)
|
139
|
-
RSpec.configuration.apply_derived_metadata_to(metadata)
|
140
139
|
end
|
141
140
|
|
142
141
|
private
|
@@ -169,7 +168,7 @@ module RSpec
|
|
169
168
|
end
|
170
169
|
|
171
170
|
def description_separator(parent_part, child_part)
|
172
|
-
if parent_part.is_a?(Module) &&
|
171
|
+
if parent_part.is_a?(Module) && /^(?:#|::|\.)/.match(child_part.to_s)
|
173
172
|
''.freeze
|
174
173
|
else
|
175
174
|
' '.freeze
|
data/lib/rspec/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.
|
4
|
+
version: 3.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Baker
|
@@ -46,7 +46,7 @@ cert_chain:
|
|
46
46
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
47
47
|
F3MdtaDehhjC
|
48
48
|
-----END CERTIFICATE-----
|
49
|
-
date:
|
49
|
+
date: 2019-06-29 00:00:00.000000000 Z
|
50
50
|
dependencies:
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: rspec-support
|
@@ -263,7 +263,12 @@ files:
|
|
263
263
|
homepage: https://github.com/rspec/rspec-core
|
264
264
|
licenses:
|
265
265
|
- MIT
|
266
|
-
metadata:
|
266
|
+
metadata:
|
267
|
+
bug_tracker_uri: https://github.com/rspec/rspec-core/issues
|
268
|
+
changelog_uri: https://github.com/rspec/rspec-core/blob/v3.8.2/Changelog.md
|
269
|
+
documentation_uri: https://rspec.info/documentation/
|
270
|
+
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
271
|
+
source_code_uri: https://github.com/rspec/rspec-core
|
267
272
|
post_install_message:
|
268
273
|
rdoc_options:
|
269
274
|
- "--charset=UTF-8"
|
@@ -280,9 +285,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
285
|
- !ruby/object:Gem::Version
|
281
286
|
version: '0'
|
282
287
|
requirements: []
|
283
|
-
|
284
|
-
rubygems_version: 2.6.13
|
288
|
+
rubygems_version: 3.0.3
|
285
289
|
signing_key:
|
286
290
|
specification_version: 4
|
287
|
-
summary: rspec-core-3.8.
|
291
|
+
summary: rspec-core-3.8.2
|
288
292
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|