rspec-expectations 3.13.2 → 3.13.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd9ff7be11872f9d88f1371372fc9a717128ea3388fcf9acff3b275fb0f5e8cf
4
- data.tar.gz: b3a3bc112297361e217afbb0d1d93fbce2aa727f73c86d2d253ebd9599284649
3
+ metadata.gz: c0eb448ddd64a8046c3aa3ea0792f4f8debdef6145a7e82a4e6631bf3f0e0fd1
4
+ data.tar.gz: c6f13e803efa869f3fc324bf641517acd6d2ad5d603aebe9e17ada09fe4a8004
5
5
  SHA512:
6
- metadata.gz: 8ac9dfa81e51d8de3844178bba62d12488a115c590f603fa4c6a31131ab83f4704cf91141038c23adda7cc5cf46306dde3caa9fa0add1c352c090e2d223736b8
7
- data.tar.gz: 3dd88399f06fcc3b9509f2bc9f51404e4087a8f43a23d723e09704fa95955d5bbd94cd4051acdefea244fad8c720737db001ad08338ea82c13a8e0d91c21f39c
6
+ metadata.gz: 2538dd5c3d20e09e95b544951a3fb4ff5f548df05e6b43ac08845514bc9f16d9c40565c324ba7c084548ad5cbedfa4a831ec4e55912f2356e5dd2faef87e0966
7
+ data.tar.gz: c1da8597d452276695dd0e9fd66941c0b209db20c4774975c2c1d5c4729e0b1c04d9593445c27d3f91d00a0847391f2ab3795e076246f79075150e6e66359efd
checksums.yaml.gz.sig CHANGED
Binary file
data/Changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  ### Development
2
- [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.13.2...3-13-maintenance)
2
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-expectations-v3.13.4...3-13-maintenance)
3
+
4
+ ### 3.13.4 / 2025-05-01
5
+
6
+ Bug Fixes:
7
+
8
+ * Prevent `match` from trying to compare strings and arrays using `Array#match`. (Joseph Haig, rspec/rspec#183)
9
+
10
+ ### 3.13.3 / 2024-09-07
11
+ [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.13.2...v3.13.3)
12
+
13
+ Bug Fixes:
14
+
15
+ * Fix passing a regular expression to the `include` matcher without a count constraint.
16
+ (Jon Rowe, rspec/rspec-expectations#1485)
3
17
 
4
18
  ### 3.13.2 / 2024-08-20
5
19
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.13.1...v3.13.2)
@@ -7,10 +21,10 @@
7
21
  Bug Fixes:
8
22
 
9
23
  * When using null object doubles, prevent typos triggering dynamic matchers.
10
- (Eric Mueller, #1455)
11
- * Use `RSpec.warning` for an expectation warning rather than `Kernel.warn`. (Jon Rowe, #1472)
12
- * Prevent mismatched use of block and value matchers in compound expectations. (Phil Pirozhkov, #1476)
13
- * Raise an error when passing no arguments to the `include` matcher. (Eric Mueller, #1479)
24
+ (Eric Mueller, rspec/rspec-expectations#1455)
25
+ * Use `RSpec.warning` for an expectation warning rather than `Kernel.warn`. (Jon Rowe, rspec/rspec-expectations#1472)
26
+ * Prevent mismatched use of block and value matchers in compound expectations. (Phil Pirozhkov, rspec/rspec-expectations#1476)
27
+ * Raise an error when passing no arguments to the `include` matcher. (Eric Mueller, rspec/rspec-expectations#1479)
14
28
 
15
29
  ### 3.13.1 / 2024-06-13
16
30
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.13.0...v3.13.1)
@@ -18,7 +32,7 @@ Bug Fixes:
18
32
  Bug Fixes:
19
33
 
20
34
  * Fix the "false positive" warning message when using a negated `raise_error` matcher
21
- with a `RegExp` instance. (Eric Mueller, #1456)
35
+ with a `RegExp` instance. (Eric Mueller, rspec/rspec-expectations#1456)
22
36
 
23
37
  ### 3.13.0 / 2024-02-04
24
38
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.12.4...v3.13.0)
@@ -26,7 +40,7 @@ Bug Fixes:
26
40
  Enhancements:
27
41
 
28
42
  * Update `eq` and `eql` matchers to better highlight difference in string encoding.
29
- (Alan Foster, #1425)
43
+ (Alan Foster, rspec/rspec-expectations#1425)
30
44
 
31
45
  ### 3.12.4 / 2024-02-04
32
46
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.12.3...v3.12.4)
@@ -34,7 +48,7 @@ Enhancements:
34
48
  Bug Fixes:
35
49
 
36
50
  * Fix the diff for redefined `actual` and reassigned `@actual` in compound
37
- expectations failure messages. (Phil Pirozhkov, #1440)
51
+ expectations failure messages. (Phil Pirozhkov, rspec/rspec-expectations#1440)
38
52
 
39
53
  ### 3.12.3 / 2023-04-20
40
54
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.12.2...v3.12.3)
@@ -43,7 +57,7 @@ Bug Fixes:
43
57
 
44
58
  * Fix `include` matcher when fuzzy matching on keys with a hash-like actual which
45
59
  has a non standard `key?` method which may raise.
46
- (Jon Rowe, #1416)
60
+ (Jon Rowe, rspec/rspec-expectations#1416)
47
61
 
48
62
  ### 3.12.2 / 2023-01-07
49
63
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.12.1...v3.12.2)
@@ -51,16 +65,16 @@ Bug Fixes:
51
65
  Bug Fixes:
52
66
 
53
67
  * Prevent deprecation warning when using the `exist` matcher with `Dir`.
54
- (Steve Dierker, #1398)
68
+ (Steve Dierker, rspec/rspec-expectations#1398)
55
69
 
56
70
  ### 3.12.1 / 2022-12-16
57
71
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.12.0...v3.12.1)
58
72
 
59
73
  Bug Fixes:
60
74
 
61
- * Pass keyword arguments through to aliased (and thus negated) matchers. (Jon Rowe, #1394)
75
+ * Pass keyword arguments through to aliased (and thus negated) matchers. (Jon Rowe, rspec/rspec-expectations#1394)
62
76
  * When handling failures in an aggregated_failures block (or example) prevent
63
- the failure list leaking out. (Maciek Rząsa, #1392)
77
+ the failure list leaking out. (Maciek Rząsa, rspec/rspec-expectations#1392)
64
78
 
65
79
  ### 3.12.0 / 2022-10-26
66
80
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.11.1...v3.12.0)
@@ -68,7 +82,7 @@ Bug Fixes:
68
82
  Enhancements:
69
83
 
70
84
  * Add `an_array_matching` alias for `match_array` to improve readability as an argument
71
- matcher. (Mark Schneider, #1361)
85
+ matcher. (Mark Schneider, rspec/rspec-expectations#1361)
72
86
 
73
87
  ### 3.11.1 / 2022-09-12
74
88
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.11.0...v3.11.1)
@@ -76,33 +90,33 @@ Enhancements:
76
90
  Bug Fixes:
77
91
 
78
92
  * Allow the `contain_exactly` matcher to be reused by resetting its
79
- internals on `matches?` (@bclayman-sq, #1326)
93
+ internals on `matches?` (@bclayman-sq, rspec/rspec-expectations#1326)
80
94
  * Using the exist matcher on `FileTest` no longer produces a deprecation warning.
81
- (Ryo Nakamura, #1383)
95
+ (Ryo Nakamura, rspec/rspec-expectations#1383)
82
96
 
83
97
  ### 3.11.0 / 2022-02-09
84
98
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.10.2...v3.11.0)
85
99
 
86
100
  Enhancements:
87
101
 
88
- * Return `true` from `aggregate_failures` when no exception occurs. (Jon Rowe, #1225)
102
+ * Return `true` from `aggregate_failures` when no exception occurs. (Jon Rowe, rspec/rspec-expectations#1225)
89
103
 
90
104
  Deprecations:
91
105
 
92
106
  * Print a deprecation message when using the implicit block expectation syntax.
93
- (Phil Pirozhkov, #1139)
107
+ (Phil Pirozhkov, rspec/rspec-expectations#1139)
94
108
 
95
109
  ### 3.10.2 / 2022-01-14
96
110
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.10.1...v3.10.2)
97
111
 
98
112
  Bug Fixes:
99
113
 
100
- * Fix support for dynamic matchers for expectation target checks (Phil Pirozhkov, #1294)
114
+ * Fix support for dynamic matchers for expectation target checks (Phil Pirozhkov, rspec/rspec-expectations#1294)
101
115
  * Fix `expect(array).to include(hash).times`, previously this would fail due to
102
116
  matching the entire array as a single hash, rather than a member of the hash.
103
- (Slava Kardakov, #1322)
117
+ (Slava Kardakov, rspec/rspec-expectations#1322)
104
118
  * Ensure `raise_error` matches works with the `error_highlight` option from Ruby 3.1.
105
- (Peter Goldstein, #1339)
119
+ (Peter Goldstein, rspec/rspec-expectations#1339)
106
120
 
107
121
  ### 3.10.1 / 2020-12-27
108
122
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.10.0...v3.10.1)
@@ -110,7 +124,7 @@ Bug Fixes:
110
124
  Bug Fixes:
111
125
 
112
126
  * Allow JRuby 9.2.x.x to generate backtraces normally rather than via our
113
- backfill workaround. (#1230, Jon Rowe)
127
+ backfill workaround. (rspec/rspec-expectations#1230, Jon Rowe)
114
128
 
115
129
  ### 3.10.0 / 2020-10-30
116
130
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.9.3...v3.10.0)
@@ -118,19 +132,19 @@ Bug Fixes:
118
132
  Enhancements:
119
133
 
120
134
  * Allow `include` matcher to be chained with `once`, `at_least`, etc. for simple cases.
121
- (Marc-André Lafortune, #1168)
122
- * Add an explicit warning when `nil` is passed to `raise_error`. (Phil Pirozhkov, #1143)
123
- * Improve `include` matcher's composability. (Phil Pirozhkov, #1155)
135
+ (Marc-André Lafortune, rspec/rspec-expectations#1168)
136
+ * Add an explicit warning when `nil` is passed to `raise_error`. (Phil Pirozhkov, rspec/rspec-expectations#1143)
137
+ * Improve `include` matcher's composability. (Phil Pirozhkov, rspec/rspec-expectations#1155)
124
138
  * Mocks expectations can now set a custom failure message.
125
- (Benoit Tigeot and Nicolas Zermati, #1156)
126
- * `aggregate_failures` now shows the backtrace line for each failure. (Fabricio Bedin, #1163)
139
+ (Benoit Tigeot and Nicolas Zermati, rspec/rspec-expectations#1156)
140
+ * `aggregate_failures` now shows the backtrace line for each failure. (Fabricio Bedin, rspec/rspec-expectations#1163)
127
141
  * Support multiple combinations of `yield_control` modifiers like `at_least`, `at_most`.
128
- (Jon Rowe, #1169)
142
+ (Jon Rowe, rspec/rspec-expectations#1169)
129
143
  * Dynamic `have_<n>` matchers now have output consistent with other dynamic matchers.
130
- (Marc-André Lafortune, #1195)
144
+ (Marc-André Lafortune, rspec/rspec-expectations#1195)
131
145
  * New config option `strict_predicate_matchers` allows predicate matcher to be strict
132
146
  (i.e. match for `true` or `false`) instead of the default (match truthy vs `false` or `nil`).
133
- (Marc-André Lafortune, #1196)
147
+ (Marc-André Lafortune, rspec/rspec-expectations#1196)
134
148
 
135
149
  ### 3.9.4 / 2020-10-29
136
150
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.9.3...v3.9.4)
@@ -138,7 +152,7 @@ Enhancements:
138
152
  Bug Fixes:
139
153
 
140
154
  * Fix regression with `be_` and `have_` matchers and arguments implementing `to_hash`
141
- were they would act like keywords and be cast to a hash. (Jon Rowe, #1222)
155
+ were they would act like keywords and be cast to a hash. (Jon Rowe, rspec/rspec-expectations#1222)
142
156
 
143
157
  ### 3.9.3 / 2020-10-23
144
158
 
@@ -146,14 +160,14 @@ Bug Fixes:
146
160
 
147
161
  * Swap the comparison of the delta vs the expected for the `be_within` matcher allowing
148
162
  more complicated oobjects to be compared providing they provide `abs` and other
149
- comparison methods. (Kelly Stannard, #1182)
150
- * Properly format expected in the description of the `be_within` matcher. (Jon Rowe, #1185)
163
+ comparison methods. (Kelly Stannard, rspec/rspec-expectations#1182)
164
+ * Properly format expected in the description of the `be_within` matcher. (Jon Rowe, rspec/rspec-expectations#1185)
151
165
  * Remove warning when using keyword arguments with `be_` and `have_` matchers on 2.7.x
152
- (Jon Rowe, #1187)
166
+ (Jon Rowe, rspec/rspec-expectations#1187)
153
167
  * Prevent formatting a single hash as a list of key value pairs in default failure messages
154
- for custom matches (fixes formatting in `EnglishPhrasing#list`). (Robert Eshleman, #1193)
168
+ for custom matches (fixes formatting in `EnglishPhrasing#list`). (Robert Eshleman, rspec/rspec-expectations#1193)
155
169
  * Prevent errors from causing false positives when using `be <operator>` comparison, e.g.
156
- `expect(1).not_to be < 'a'` will now correctly fail rather than pass. (Jon Rowe, #1208)
170
+ `expect(1).not_to be < 'a'` will now correctly fail rather than pass. (Jon Rowe, rspec/rspec-expectations#1208)
157
171
 
158
172
 
159
173
  ### 3.9.2 / 2020-05-08
@@ -162,9 +176,9 @@ Bug Fixes:
162
176
  Bug Fixes:
163
177
 
164
178
  * Issue a proper `ArgumentError` when invalid arguments are given to `yield_control`
165
- modifiers such as `at_least` et al. (Marc-André Lafortune, #1167)
179
+ modifiers such as `at_least` et al. (Marc-André Lafortune, rspec/rspec-expectations#1167)
166
180
  * Prevent Ruby 2.7 keyword arguments warning from being issued by custom
167
- matcher definitions. (Jon Rowe, #1176)
181
+ matcher definitions. (Jon Rowe, rspec/rspec-expectations#1176)
168
182
 
169
183
  ### 3.9.1 / 2020-03-13
170
184
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.9.0...v3.9.1)
@@ -172,7 +186,7 @@ Bug Fixes:
172
186
  Bug Fixes:
173
187
 
174
188
  * Issue an improved warning when using `respond_to(...).with(n).arguments` and ignore
175
- the warning when using with `have_attributes(...)`. (Jon Rowe, #1164)
189
+ the warning when using with `have_attributes(...)`. (Jon Rowe, rspec/rspec-expectations#1164)
176
190
 
177
191
  ### 3.9.0 / 2019-10-08
178
192
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.6...v3.9.0)
@@ -180,19 +194,19 @@ Bug Fixes:
180
194
  Enhancements:
181
195
 
182
196
  * The `respond_to` matcher now uses the signature from `initialize` to validate checks
183
- for `new` (unless `new` is non standard). (Jon Rowe, #1072)
197
+ for `new` (unless `new` is non standard). (Jon Rowe, rspec/rspec-expectations#1072)
184
198
  * Generated descriptions for matchers now use `is expected to` rather than `should` in
185
- line with our preferred DSL. (Pete Johns, #1080, rspec/rspec-core#2572)
199
+ line with our preferred DSL. (Pete Johns, rspec/rspec-expectations#1080, rspec/rspec-corerspec/rspec-expectations#2572)
186
200
  * Add the ability to re-raise expectation errors when matching
187
- with `match_when_negated` blocks. (Jon Rowe, #1130)
201
+ with `match_when_negated` blocks. (Jon Rowe, rspec/rspec-expectations#1130)
188
202
  * Add a warning when an empty diff is produce due to identical inspect output.
189
- (Benoit Tigeot, #1126)
203
+ (Benoit Tigeot, rspec/rspec-expectations#1126)
190
204
 
191
205
  ### 3.8.6 / 2019-10-07
192
206
 
193
207
  Bug Fixes:
194
208
 
195
- * Revert #1125 due to the change being incompatible with our semantic versioning
209
+ * Revert rspec/rspec-expectations#1125 due to the change being incompatible with our semantic versioning
196
210
  policy.
197
211
 
198
212
  ### 3.8.5 / 2019-10-02
@@ -201,7 +215,7 @@ Bug Fixes:
201
215
  Bug Fixes:
202
216
 
203
217
  * Prevent unsupported implicit block expectation syntax from being used.
204
- (Phil Pirozhkov, #1125)
218
+ (Phil Pirozhkov, rspec/rspec-expectations#1125)
205
219
 
206
220
  ### 3.8.4 / 2019-06-10
207
221
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.3...v3.8.4)
@@ -209,7 +223,7 @@ Bug Fixes:
209
223
  Bug Fixes:
210
224
 
211
225
  * Prevent false negatives when checking objects for the methods required to run the
212
- the `be_an_instance_of` and `be_kind_of` matchers. (Nazar Matus, #1112)
226
+ the `be_an_instance_of` and `be_kind_of` matchers. (Nazar Matus, rspec/rspec-expectations#1112)
213
227
 
214
228
  ### 3.8.3 / 2019-04-20
215
229
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.2...v3.8.3)
@@ -217,12 +231,12 @@ Bug Fixes:
217
231
  Bug Fixes:
218
232
 
219
233
  * Prevent composed `all` matchers from leaking into their siblings leading to duplicate
220
- failures. (Jamie English, #1086)
234
+ failures. (Jamie English, rspec/rspec-expectations#1086)
221
235
  * Prevent objects which change their hash on comparison from failing change checks.
222
- (Phil Pirozhkov, #1100)
236
+ (Phil Pirozhkov, rspec/rspec-expectations#1100)
223
237
  * Issue an `ArgumentError` rather than a `NoMethodError` when `be_an_instance_of` and
224
238
  `be_kind_of` matchers encounter objects not supporting those methods.
225
- (Taichi Ishitani, #1107)
239
+ (Taichi Ishitani, rspec/rspec-expectations#1107)
226
240
 
227
241
  ### 3.8.2 / 2018-10-09
228
242
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.1...v3.8.2)
@@ -230,9 +244,9 @@ Bug Fixes:
230
244
  Bug Fixes:
231
245
 
232
246
  * Change `include` matcher to rely on a `respond_to?(:include?)` check rather than a direct
233
- Hash comparison before calling `to_hash` to convert to a hash. (Jordan Owens, #1073)
247
+ Hash comparison before calling `to_hash` to convert to a hash. (Jordan Owens, rspec/rspec-expectations#1073)
234
248
  * Prevent unexpected call stack jumps from causing an obscure error (`IndexError`), and
235
- replace that error with a proper informative message. (Jon Rowe, #1076)
249
+ replace that error with a proper informative message. (Jon Rowe, rspec/rspec-expectations#1076)
236
250
 
237
251
  ### 3.8.1 / 2018-08-06
238
252
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.0...v3.8.1)
@@ -241,7 +255,7 @@ Bug Fixes:
241
255
 
242
256
  * Fix regression in `include` matcher so stopped
243
257
  `expect(hash.with_indifferent_access).to include(:symbol_key)`
244
- from working. (Eito Katagiri, #1069)
258
+ from working. (Eito Katagiri, rspec/rspec-expectations#1069)
245
259
 
246
260
  ### 3.8.0 / 2018-08-04
247
261
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.7.0...v3.8.0)
@@ -249,20 +263,20 @@ Bug Fixes:
249
263
  Enhancements:
250
264
 
251
265
  * Improve failure message of `change(receiver, :message)` by including the
252
- receiver as `SomeClass#some_message`. (Tomohiro Hashidate, #1005)
266
+ receiver as `SomeClass#some_message`. (Tomohiro Hashidate, rspec/rspec-expectations#1005)
253
267
  * Improve `change` matcher so that it can correctly detect changes in
254
268
  deeply nested mutable objects (such as arrays-of-hashes-of-arrays).
255
269
  The improved logic uses the before/after `hash` value to see if the
256
270
  object has been mutated, rather than shallow duping the object.
257
- (Myron Marston, #1034)
271
+ (Myron Marston, rspec/rspec-expectations#1034)
258
272
  * Improve `include` matcher so that pseudo-hash objects (e.g. objects
259
273
  that decorate a hash using a `SimpleDelegator` or similar) are treated
260
- as a hash, as long as they implement `to_hash`. (Pablo Brasero, #1012)
274
+ as a hash, as long as they implement `to_hash`. (Pablo Brasero, rspec/rspec-expectations#1012)
261
275
  * Add `max_formatted_output_length=` to configuration, allowing changing
262
276
  the length at which we truncate large output strings.
263
- (Sam Phippen #951, Benoit Tigeot #1056)
277
+ (Sam Phippen rspec/rspec-expectations#951, Benoit Tigeot rspec/rspec-expectations#1056)
264
278
  * Improve error message when passing a matcher that doesn't support block
265
- expectations to a block based `expect`. (@nicktime, #1066)
279
+ expectations to a block based `expect`. (@nicktime, rspec/rspec-expectations#1066)
266
280
 
267
281
  ### 3.7.0 / 2017-10-17
268
282
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.6.0...v3.7.0)
@@ -270,27 +284,27 @@ Enhancements:
270
284
  Enhancements:
271
285
 
272
286
  * Improve compatibility with `--enable-frozen-string-literal` option
273
- on Ruby 2.3+. (Pat Allan, #997)
287
+ on Ruby 2.3+. (Pat Allan, rspec/rspec-expectations#997)
274
288
 
275
289
  ### 3.6.0 / 2017-05-04
276
290
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.6.0.beta2...v3.6.0)
277
291
 
278
292
  Enhancements:
279
293
 
280
- * Treat NoMethodError as a failure for comparison matchers. (Jon Rowe, #972)
294
+ * Treat NoMethodError as a failure for comparison matchers. (Jon Rowe, rspec/rspec-expectations#972)
281
295
  * Allow for scoped aliased and negated matchers--just call
282
296
  `alias_matcher` or `define_negated_matcher` from within an example
283
- group. (Markus Reiter, #974)
297
+ group. (Markus Reiter, rspec/rspec-expectations#974)
284
298
  * Improve failure message of `change` matcher with block and `satisfy` matcher
285
299
  by including the block snippet instead of just describing it as `result` or
286
- `block` when Ripper is available. (Yuji Nakayama, #987)
300
+ `block` when Ripper is available. (Yuji Nakayama, rspec/rspec-expectations#987)
287
301
 
288
302
  Bug Fixes:
289
303
 
290
304
  * Fix `yield_with_args` and `yield_successive_args` matchers so that
291
305
  they compare expected to actual args at the time the args are yielded
292
306
  instead of at the end, in case the method that is yielding mutates the
293
- arguments after yielding. (Alyssa Ross, #965)
307
+ arguments after yielding. (Alyssa Ross, rspec/rspec-expectations#965)
294
308
 
295
309
  ### 3.6.0.beta2 / 2016-12-12
296
310
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.6.0.beta1...v3.6.0.beta2)
@@ -298,29 +312,29 @@ Bug Fixes:
298
312
  Bug Fixes:
299
313
 
300
314
  * Using the exist matcher on `File` no longer produces a deprecation warning.
301
- (Jon Rowe, #954)
315
+ (Jon Rowe, rspec/rspec-expectations#954)
302
316
 
303
317
  ### 3.6.0.beta1 / 2016-10-09
304
318
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.5.0...v3.6.0.beta1)
305
319
 
306
320
  Bug Fixes:
307
321
 
308
- * Fix `contain_exactly` to work correctly with ranges. (Myron Marston, #940)
309
- * Fix `change` to work correctly with sets. (Marcin Gajewski, #939)
322
+ * Fix `contain_exactly` to work correctly with ranges. (Myron Marston, rspec/rspec-expectations#940)
323
+ * Fix `change` to work correctly with sets. (Marcin Gajewski, rspec/rspec-expectations#939)
310
324
 
311
325
  ### 3.5.0 / 2016-07-01
312
326
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.5.0.beta4...v3.5.0)
313
327
 
314
328
  Enhancements:
315
329
 
316
- * Add support for keyword arguments to the `respond_to` matcher. (Rob Smith, #915).
330
+ * Add support for keyword arguments to the `respond_to` matcher. (Rob Smith, rspec/rspec-expectations#915).
317
331
 
318
332
  ### 3.5.0.beta4 / 2016-06-05
319
333
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.5.0.beta3...v3.5.0.beta4)
320
334
 
321
335
  Bug Fixes:
322
336
 
323
- * Fix `include` matcher so that it provides a valid diff for hashes. (Yuji Nakayama, #916)
337
+ * Fix `include` matcher so that it provides a valid diff for hashes. (Yuji Nakayama, rspec/rspec-expectations#916)
324
338
 
325
339
  ### 3.5.0.beta3 / 2016-04-02
326
340
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.5.0.beta2...v3.5.0.beta3)
@@ -328,11 +342,11 @@ Bug Fixes:
328
342
  Enhancements:
329
343
 
330
344
  * Make `rspec/expectations/minitest_integration` work on Minitest::Spec
331
- 5.6+. (Myron Marston, #904)
345
+ 5.6+. (Myron Marston, rspec/rspec-expectations#904)
332
346
  * Add an alias `having_attributes` for `have_attributes` matcher.
333
- (Yuji Nakayama, #905)
347
+ (Yuji Nakayama, rspec/rspec-expectations#905)
334
348
  * Improve `change` matcher error message when block is mis-used.
335
- (Alex Altair, #908)
349
+ (Alex Altair, rspec/rspec-expectations#908)
336
350
 
337
351
  ### 3.5.0.beta2 / 2016-03-10
338
352
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.5.0.beta1...v3.5.0.beta2)
@@ -340,15 +354,15 @@ Enhancements:
340
354
  Enhancements:
341
355
 
342
356
  * Add the ability to raise an error on encountering false positives via
343
- `RSpec::Configuration#on_potential_false_positives = :raise`. (Jon Rowe, #900)
357
+ `RSpec::Configuration#on_potential_false_positives = :raise`. (Jon Rowe, rspec/rspec-expectations#900)
344
358
  * When using the custom matcher DSL, support new
345
359
  `notify_expectation_failures: true` option for the `match` method to
346
360
  allow expectation failures to be raised as normal instead of being
347
- converted into a `false` return value for `matches?`. (Jon Rowe, #892)
361
+ converted into a `false` return value for `matches?`. (Jon Rowe, rspec/rspec-expectations#892)
348
362
 
349
363
  Bug Fixes:
350
364
 
351
- * Allow `should` deprecation check to work on `BasicObject`s. (James Coleman, #898)
365
+ * Allow `should` deprecation check to work on `BasicObject`s. (James Coleman, rspec/rspec-expectations#898)
352
366
 
353
367
  ### 3.5.0.beta1 / 2016-02-06
354
368
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.4.0...v3.5.0.beta1)
@@ -356,14 +370,14 @@ Bug Fixes:
356
370
  Enhancements:
357
371
 
358
372
  * Make `match_when_negated` in custom matcher DSL support use of
359
- expectations within the match logic. (Chris Arcand, #789)
373
+ expectations within the match logic. (Chris Arcand, rspec/rspec-expectations#789)
360
374
 
361
375
  Bug Fixes:
362
376
 
363
377
  * Return `true` as expected from passing negated expectations
364
378
  (such as `expect("foo").not_to eq "bar"`), so they work
365
379
  properly when used within a `match` or `match_when_negated`
366
- block. (Chris Arcand, #789)
380
+ block. (Chris Arcand, rspec/rspec-expectations#789)
367
381
 
368
382
  ### 3.4.0 / 2015-11-11
369
383
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.3.1...v3.4.0)
@@ -372,22 +386,22 @@ Enhancements:
372
386
 
373
387
  * Warn when `RSpec::Matchers` is included in a superclass after it has
374
388
  already been included in a subclass on MRI 1.9, since that situation
375
- can cause uses of `super` to trigger infinite recursion. (Myron Marston, #816)
389
+ can cause uses of `super` to trigger infinite recursion. (Myron Marston, rspec/rspec-expectations#816)
376
390
  * Stop rescuing `NoMemoryError`, `SignalExcepetion`, `Interrupt` and
377
- `SystemExit`. It is dangerous to interfere with these. (Myron Marston, #845)
391
+ `SystemExit`. It is dangerous to interfere with these. (Myron Marston, rspec/rspec-expectations#845)
378
392
  * Add `#with_captures` to the match matcher which allows a user to specify expected
379
- captures when matching a regex against a string. (Sam Phippen, #848)
393
+ captures when matching a regex against a string. (Sam Phippen, rspec/rspec-expectations#848)
380
394
  * Always print compound failure messages in the multi-line form. Trying
381
- to print it all on a single line didn't read very well. (Myron Marston, #859)
395
+ to print it all on a single line didn't read very well. (Myron Marston, rspec/rspec-expectations#859)
382
396
 
383
397
  Bug Fixes:
384
398
 
385
399
  * Fix failure message from dynamic predicate matchers when the object
386
400
  does not respond to the predicate so that it is inspected rather
387
401
  than relying upon its `to_s` -- that way for `nil`, `"nil"` is
388
- printed rather than an empty string. (Myron Marston, #841)
402
+ printed rather than an empty string. (Myron Marston, rspec/rspec-expectations#841)
389
403
  * Fix SystemStackError raised when diffing an Enumerable object
390
- whose `#each` includes the object itself. (Yuji Nakayama, #857)
404
+ whose `#each` includes the object itself. (Yuji Nakayama, rspec/rspec-expectations#857)
391
405
 
392
406
  ### 3.3.1 / 2015-07-15
393
407
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.3.0...v3.3.1)
@@ -397,9 +411,9 @@ Bug Fixes:
397
411
  * Fix `be >`, `be <`, etc so that it fails rather than allowing an
398
412
  argument error to be raised when compared against an object of the
399
413
  wrong type. This allows it to be used in composed matcher expressions
400
- against heterogeneous objects. (Dennis Günnewig, #809)
414
+ against heterogeneous objects. (Dennis Günnewig, rspec/rspec-expectations#809)
401
415
  * Fix `respond_to` to work properly on target objects
402
- that redefine the `method` method. (unmanbearpig, #821)
416
+ that redefine the `method` method. (unmanbearpig, rspec/rspec-expectations#821)
403
417
 
404
418
  ### 3.3.0 / 2015-06-12
405
419
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.2.1...v3.3.0)
@@ -407,50 +421,50 @@ Bug Fixes:
407
421
  Enhancements:
408
422
 
409
423
  * Expose `RSpec::Matchers::EnglishPhrasing` to make it easier to write
410
- nice failure messages in custom matchers. (Jared Beck, #736)
424
+ nice failure messages in custom matchers. (Jared Beck, rspec/rspec-expectations#736)
411
425
  * Add `RSpec::Matchers::FailMatchers`, a mixin which provides
412
426
  `fail`, `fail_with` and `fail_including` matchers for use in
413
427
  specifying that an expectation fails for use by
414
- extension/plugin authors. (Charlie Rudolph, #729)
428
+ extension/plugin authors. (Charlie Rudolph, rspec/rspec-expectations#729)
415
429
  * Avoid loading `tempfile` (and its dependencies) unless
416
- it is absolutely needed. (Myron Marston, #735)
430
+ it is absolutely needed. (Myron Marston, rspec/rspec-expectations#735)
417
431
  * Improve failure output when attempting to use `be_true` or `be_false`.
418
- (Tim Wade, #744)
432
+ (Tim Wade, rspec/rspec-expectations#744)
419
433
  * Define `RSpec::Matchers#respond_to_missing?` so that
420
434
  `RSpec::Matchers#respond_to?` and `RSpec::Matchers#method` handle
421
- dynamic predicate matchers. (Andrei Botalov, #751)
435
+ dynamic predicate matchers. (Andrei Botalov, rspec/rspec-expectations#751)
422
436
  * Use custom Time/DateTime/BigDecimal formatting for all matchers
423
437
  so they are consistently represented in failure messages.
424
- (Gavin Miller, #740)
438
+ (Gavin Miller, rspec/rspec-expectations#740)
425
439
  * Add configuration to turn off warnings about matcher combinations that
426
- may cause false positives. (Jon Rowe, #768)
440
+ may cause false positives. (Jon Rowe, rspec/rspec-expectations#768)
427
441
  * Warn when using a bare `raise_error` matcher that you may be subject to
428
- false positives. (Jon Rowe, #768)
442
+ false positives. (Jon Rowe, rspec/rspec-expectations#768)
429
443
  * Warn rather than raise when using the`raise_error` matcher in negative
430
- expectations that may be subject to false positives. (Jon Rowe, #775)
444
+ expectations that may be subject to false positives. (Jon Rowe, rspec/rspec-expectations#775)
431
445
  * Improve failure message for `include(a, b, c)` so that if `a` and `b`
432
- are included the failure message only mentions `c`. (Chris Arcand, #780)
446
+ are included the failure message only mentions `c`. (Chris Arcand, rspec/rspec-expectations#780)
433
447
  * Allow `satisfy` matcher to take an optional description argument
434
448
  that will be used in the `description`, `failure_message` and
435
449
  `failure_message_when_negated` in place of the undescriptive
436
- "sastify block". (Chris Arcand, #783)
450
+ "sastify block". (Chris Arcand, rspec/rspec-expectations#783)
437
451
  * Add new `aggregate_failures` API that allows multiple independent
438
452
  expectations to all fail and be listed in the failure output, rather
439
- than the example aborting on the first failure. (Myron Marston, #776)
453
+ than the example aborting on the first failure. (Myron Marston, rspec/rspec-expectations#776)
440
454
  * Improve `raise_error` matcher so that it can accept a matcher as a single argument
441
- that matches the message. (Time Wade, #782)
455
+ that matches the message. (Time Wade, rspec/rspec-expectations#782)
442
456
 
443
457
  Bug Fixes:
444
458
 
445
459
  * Make `contain_exactly` / `match_array` work with strict test doubles
446
- that have not defined `<=>`. (Myron Marston, #758)
460
+ that have not defined `<=>`. (Myron Marston, rspec/rspec-expectations#758)
447
461
  * Fix `include` matcher so that it omits the diff when it would
448
462
  confusingly highlight items that are actually included but are not
449
- an exact match in a line-by-line diff. (Tim Wade, #763)
463
+ an exact match in a line-by-line diff. (Tim Wade, rspec/rspec-expectations#763)
450
464
  * Fix `match` matcher so that it does not blow up when matching a string
451
465
  or regex against another matcher (rather than a string or regex).
452
- (Myron Marston, #772)
453
- * Silence whitespace-only diffs. (Myron Marston, #801)
466
+ (Myron Marston, rspec/rspec-expectations#772)
467
+ * Silence whitespace-only diffs. (Myron Marston, rspec/rspec-expectations#801)
454
468
 
455
469
  ### 3.2.1 / 2015-04-06
456
470
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.2.0...v3.2.1)
@@ -458,9 +472,9 @@ Bug Fixes:
458
472
  Bug Fixes:
459
473
 
460
474
  * Prevent `Range`s from being enumerated when generating matcher
461
- descriptions. (Jon Rowe, #755)
475
+ descriptions. (Jon Rowe, rspec/rspec-expectations#755)
462
476
  * Ensure exception messages are compared as strings in the `raise_error`
463
- matcher. (Jon Rowe, #755)
477
+ matcher. (Jon Rowe, rspec/rspec-expectations#755)
464
478
 
465
479
  ### 3.2.0 / 2015-02-03
466
480
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.1.2...v3.2.0)
@@ -469,25 +483,25 @@ Enhancements:
469
483
 
470
484
  * Add `block_arg` method to custom matcher API, which allows you to
471
485
  access the block passed to a custom matcher, if there is one.
472
- (Mike Dalton, #645)
486
+ (Mike Dalton, rspec/rspec-expectations#645)
473
487
  * Provide more detail in failure message of `yield_control` matcher.
474
- (Jon Rowe, #650)
488
+ (Jon Rowe, rspec/rspec-expectations#650)
475
489
  * Add a shorthand syntax for `chain` in the matcher DSL which assigns values
476
490
  for use elsewhere, for example `chain :and_smaller_than, :small_value`
477
- creates an `attr_reader` for `small_value` (Tom Stuart, #644)
491
+ creates an `attr_reader` for `small_value` (Tom Stuart, rspec/rspec-expectations#644)
478
492
  * Provide a more helpful deprecation message when using the `should` syntax.
479
- (Elia Schito, #663)
493
+ (Elia Schito, rspec/rspec-expectations#663)
480
494
  * Provide more detail in the `have_attributes` matcher failure message.
481
- (Jon Rowe, #668)
495
+ (Jon Rowe, rspec/rspec-expectations#668)
482
496
  * Make the `have_attributes` matcher diffable.
483
- (Jon Rowe, Alexey Fedorov, #668)
497
+ (Jon Rowe, Alexey Fedorov, rspec/rspec-expectations#668)
484
498
  * Add `output(...).to_std(out|err)_from_any_process` as alternatives
485
499
  to `output(...).to_std(out|err)`. The latter doesn't work when a sub
486
500
  process writes to the named stream but is much faster.
487
- (Alex Genco, #700)
501
+ (Alex Genco, rspec/rspec-expectations#700)
488
502
  * Improve compound matchers (created by `and` and `or`) so that diffs
489
503
  are included in failures when one or more of their matchers
490
- are diffable. (Alexey Fedorov, #713)
504
+ are diffable. (Alexey Fedorov, rspec/rspec-expectations#713)
491
505
 
492
506
  Bug Fixes:
493
507
 
@@ -495,17 +509,17 @@ Bug Fixes:
495
509
  the target object if the object publicly responds to the predicate
496
510
  method. This avoids a possible error that can occur if the object
497
511
  raises errors from `private_methods` (which can happen with celluloid
498
- objects). (@chapmajs, #670)
512
+ objects). (@chapmajs, rspec/rspec-expectations#670)
499
513
  * Make `yield_control` (with no modifier) default to
500
514
  `at_least(:once)` rather than raising a confusing error
501
515
  when multiple yields are encountered.
502
- (Myron Marston, #675)
516
+ (Myron Marston, rspec/rspec-expectations#675)
503
517
  * Fix "instance variable @color not initialized" warning when using
504
- rspec-expectations outside of an rspec-core context. (Myron Marston, #689)
518
+ rspec-expectations outside of an rspec-core context. (Myron Marston, rspec/rspec-expectations#689)
505
519
  * Fix `start_with` and `end_with` to work properly when checking a
506
- string against an array of strings. (Myron Marston, #690)
520
+ string against an array of strings. (Myron Marston, rspec/rspec-expectations#690)
507
521
  * Don't use internally delegated matchers when generating descriptions
508
- for examples without doc strings. (Myron Marston, #692)
522
+ for examples without doc strings. (Myron Marston, rspec/rspec-expectations#692)
509
523
 
510
524
  ### 3.1.2 / 2014-09-26
511
525
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.1.1...v3.1.2)
@@ -514,9 +528,9 @@ Bug Fixes:
514
528
 
515
529
  * Fix `define_negated_matcher` so that matchers that support fluent
516
530
  interfaces continue to be negated after you use the chained method.
517
- (Myron Marston, #656)
531
+ (Myron Marston, rspec/rspec-expectations#656)
518
532
  * Fix `define_negated_matcher` so that the matchers fail with an
519
- appropriate failure message. (Myron Marston, #659)
533
+ appropriate failure message. (Myron Marston, rspec/rspec-expectations#659)
520
534
 
521
535
  ### 3.1.1 / 2014-09-15
522
536
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.1.0...v3.1.1)
@@ -525,7 +539,7 @@ Bug Fixes:
525
539
 
526
540
  * Fix regression in `all` matcher in 3.1.0 that prevented it from
527
541
  working on objects that are not `Enumerable` but do implement
528
- `each_with_index` (such as an ActiveRecord proxy). (Jori Hardman, #647)
542
+ `each_with_index` (such as an ActiveRecord proxy). (Jori Hardman, rspec/rspec-expectations#647)
529
543
 
530
544
  ### 3.1.0 / 2014-09-04
531
545
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.4...v3.1.0)
@@ -537,26 +551,26 @@ Enhancements:
537
551
  `Person = Struct.new(:name, :age)`
538
552
  `person = Person.new("Bob", 32)`
539
553
  `expect(person).to have_attributes(:name => "Bob", :age => 32)`.
540
- (Adam Farhi, #571)
554
+ (Adam Farhi, rspec/rspec-expectations#571)
541
555
  * Extended compound matcher support to block matchers, for cases like:
542
556
  `expect { ... }.to change { x }.to(3).and change { y }.to(4)`. (Myron
543
- Marston, #567)
557
+ Marston, rspec/rspec-expectations#567)
544
558
  * Include chained methods in custom matcher description and failure message
545
559
  when new `include_chain_clauses_in_custom_matcher_descriptions` config
546
- option is enabled. (Dan Oved, #600)
560
+ option is enabled. (Dan Oved, rspec/rspec-expectations#600)
547
561
  * Add `thrice` modifier to `yield_control` matcher as a synonym for
548
- `exactly(3).times`. (Dennis Taylor, #615)
562
+ `exactly(3).times`. (Dennis Taylor, rspec/rspec-expectations#615)
549
563
  * Add `RSpec::Matchers.define_negated_matcher`, which defines a negated
550
- version of the named matcher. (Adam Farhi, Myron Marston, #618)
564
+ version of the named matcher. (Adam Farhi, Myron Marston, rspec/rspec-expectations#618)
551
565
  * Document and support negation of `contain_exactly`/`match_array`.
552
- (Jon Rowe, #626).
566
+ (Jon Rowe, rspec/rspec-expectations#626).
553
567
 
554
568
  Bug Fixes:
555
569
 
556
570
  * Rename private `LegacyMacherAdapter` constant to `LegacyMatcherAdapter`
557
- to fix typo. (Abdelkader Boudih, #563)
571
+ to fix typo. (Abdelkader Boudih, rspec/rspec-expectations#563)
558
572
  * Fix `all` matcher so that it fails properly (rather than raising a
559
- `NoMethodError`) when matched against a non-enumerable. (Hao Su, #622)
573
+ `NoMethodError`) when matched against a non-enumerable. (Hao Su, rspec/rspec-expectations#622)
560
574
 
561
575
  ### 3.0.4 / 2014-08-14
562
576
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.3...v3.0.4)
@@ -564,12 +578,12 @@ Bug Fixes:
564
578
  Bug Fixes:
565
579
 
566
580
  * Fix `start_with` and `end_with` so that they work properly with
567
- structs. (Myron Marston, #620)
581
+ structs. (Myron Marston, rspec/rspec-expectations#620)
568
582
  * Fix failure message generation so that structs are printed properly
569
583
  in failures. Previously failure messages would represent them as
570
- an array. (Myron Marston, #620)
584
+ an array. (Myron Marston, rspec/rspec-expectations#620)
571
585
  * Fix composable matcher support so that it does not wrongly treat
572
- structs as arrays. (Myron Marston, #620)
586
+ structs as arrays. (Myron Marston, rspec/rspec-expectations#620)
573
587
 
574
588
  ### 3.0.3 / 2014-07-21
575
589
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.2...v3.0.3)
@@ -577,10 +591,10 @@ Bug Fixes:
577
591
  Bug Fixes:
578
592
 
579
593
  * Fix issue with detection of generic operator matchers so they work
580
- correctly when undefined. (Myron Marston, #597)
581
- * Don't inadvertently define `BasicObject` in 1.8.7. (Chris Griego, #603)
594
+ correctly when undefined. (Myron Marston, rspec/rspec-expectations#597)
595
+ * Don't inadvertently define `BasicObject` in 1.8.7. (Chris Griego, rspec/rspec-expectations#603)
582
596
  * Fix `include` matcher so that it fails gracefully when matched against
583
- an object that does not respond to `include?`. (Myron Marston, #607)
597
+ an object that does not respond to `include?`. (Myron Marston, rspec/rspec-expectations#607)
584
598
 
585
599
  ### 3.0.2 / 2014-06-19
586
600
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.1...v3.0.2)
@@ -588,12 +602,12 @@ Bug Fixes:
588
602
  Bug Fixes:
589
603
 
590
604
  * Fix regression in `contain_exactly` (AKA `match_array`) that caused it
591
- to wrongly pass when the expected array was empty. (Myron Marston, #581)
605
+ to wrongly pass when the expected array was empty. (Myron Marston, rspec/rspec-expectations#581)
592
606
  * Provide a better error message when you use the `change(obj, :msg)`
593
607
  form of the change matcher but forget the message argument. (Alex
594
- Sunderland, #585)
608
+ Sunderland, rspec/rspec-expectations#585)
595
609
  * Make the `contain_exactly` matcher work with arrays that contain hashes in
596
- arbitrary ordering. (Sam Phippen, #578)
610
+ arbitrary ordering. (Sam Phippen, rspec/rspec-expectations#578)
597
611
 
598
612
  ### 3.0.1 / 2014-06-12
599
613
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.0...v3.0.1)
@@ -602,8 +616,8 @@ Bug Fixes:
602
616
 
603
617
  * Add a missing `require` that would cause the `respond_to` matcher to
604
618
  fail when used in a project where the rest of RSpec (e.g. core and
605
- expecatations) weren't being used. (Myron Marston, #566)
606
- * Structs are no longer treated as arrays when diffed. (Jon Rowe, #576)
619
+ expecatations) weren't being used. (Myron Marston, rspec/rspec-expectations#566)
620
+ * Structs are no longer treated as arrays when diffed. (Jon Rowe, rspec/rspec-expectations#576)
607
621
 
608
622
  ### 3.0.0 / 2014-06-01
609
623
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.0.0.rc1...v3.0.0)
@@ -821,9 +835,9 @@ Bug Fixes:
821
835
 
822
836
  * Fix regression in `Expectations#method_handle_for` where proxy objects
823
837
  with method delegated would wrongly not return a method handle.
824
- (Jon Rowe, #594)
838
+ (Jon Rowe, rspec/rspec-expectations#594)
825
839
  * Fix issue with detection of generic operator matchers so they work
826
- correctly when undefined. (Myron Marston, #597)
840
+ correctly when undefined. (Myron Marston, rspec/rspec-expectations#597)
827
841
 
828
842
  ### 2.99.1 / 2014-06-19
829
843
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.0...v2.99.1)
@@ -831,7 +845,7 @@ Bug Fixes:
831
845
  Bug Fixes:
832
846
 
833
847
  * Fix typo in custom matcher `expected` deprecation warning -- it's
834
- `expected_as_array`, not `expected_array`. (Frederick Cheung, #562)
848
+ `expected_as_array`, not `expected_array`. (Frederick Cheung, rspec/rspec-expectations#562)
835
849
 
836
850
  ### 2.99.0 / 2014-06-01
837
851
  [Full Changelog](http://github.com/rspec/rspec-expectations/compare/v2.99.0.rc1...v2.99.0)
@@ -179,11 +179,18 @@ module RSpec
179
179
  # no-op, handler is something else
180
180
  end
181
181
  end
182
+
183
+ # Configures what RSpec will do about matcher use which would potentially cause
184
+ # false positives in tests. Defaults to `:warn` since this is generally the desired behavior,
185
+ # but can also be set to `:raise` or `:nothing`.
182
186
  #
183
- # Configures what RSpec will do about matcher use which will
184
- # potentially cause false positives in tests.
185
- #
186
- # @param [Symbol] behavior can be set to :warn, :raise or :nothing
187
+ # @overload on_potential_false_positives
188
+ # @return [Symbol] the behavior setting
189
+ # @overload on_potential_false_positives=(value)
190
+ # @param [Symbol] behavior can be set to `:warn`, `:raise` or `:nothing`
191
+ # @return [Symbol] the behavior setting
192
+ attr_reader :on_potential_false_positives
193
+
187
194
  def on_potential_false_positives=(behavior)
188
195
  unless FALSE_POSITIVE_BEHAVIOURS.key?(behavior)
189
196
  raise ArgumentError, "Supported values are: #{FALSE_POSITIVE_BEHAVIOURS.keys}"
@@ -194,22 +201,24 @@ module RSpec
194
201
  # Configures RSpec to check predicate matchers to `be(true)` / `be(false)` (strict),
195
202
  # or `be_truthy` / `be_falsey` (not strict).
196
203
  # Historically, the default was `false`, but `true` is recommended.
197
- def strict_predicate_matchers=(flag)
198
- raise ArgumentError, "Pass `true` or `false`" unless flag == true || flag == false
199
- @strict_predicate_matchers = flag
200
- end
201
-
204
+ #
205
+ # @overload strict_predicate_matchers
206
+ # @return [Boolean]
207
+ # @overload strict_predicate_matchers?
208
+ # @return [Boolean]
209
+ # @overload strict_predicate_matchers=(value)
210
+ # @param [Boolean] value
202
211
  attr_reader :strict_predicate_matchers
203
212
 
213
+ def strict_predicate_matchers=(value)
214
+ raise ArgumentError, "Pass `true` or `false`" unless value == true || value == false
215
+ @strict_predicate_matchers = value
216
+ end
217
+
204
218
  def strict_predicate_matchers?
205
219
  @strict_predicate_matchers
206
220
  end
207
221
 
208
- # Indicates what RSpec will do about matcher use which will
209
- # potentially cause false positives in tests, generally you want to
210
- # avoid such scenarios so this defaults to `true`.
211
- attr_reader :on_potential_false_positives
212
-
213
222
  # Indicates whether RSpec will warn about matcher use which will
214
223
  # potentially cause false positives in tests, generally you want to
215
224
  # avoid such scenarios so this defaults to `true`.
@@ -2,7 +2,7 @@ module RSpec
2
2
  module Expectations
3
3
  # @private
4
4
  module Version
5
- STRING = '3.13.2'
5
+ STRING = '3.13.4'
6
6
  end
7
7
  end
8
8
  end
@@ -166,6 +166,7 @@ module RSpec
166
166
  end
167
167
 
168
168
  def actual_collection_includes?(expected_item)
169
+ return actual.scan(expected_item).size > 0 if Regexp === expected_item && String === actual
169
170
  return true if actual.include?(expected_item)
170
171
 
171
172
  # String lacks an `any?` method...
@@ -200,6 +201,7 @@ module RSpec
200
201
 
201
202
  def diff_would_wrongly_highlight_matched_item?
202
203
  return false unless actual.is_a?(String) && expected.is_a?(Array)
204
+ return false if Regexp === expecteds.first
203
205
 
204
206
  lines = actual.split("\n")
205
207
  expected.any? do |str|
@@ -33,11 +33,23 @@ module RSpec
33
33
  self
34
34
  end
35
35
 
36
+ # @api private
37
+ # @return [String]
38
+ def failure_message
39
+ if Array === expected && !(actual.respond_to?(:to_a) || actual.respond_to?(:to_ary))
40
+ return "expected a collection that can be converted to an array with " \
41
+ "`#to_ary` or `#to_a`, but got #{actual_formatted}"
42
+ end
43
+
44
+ super
45
+ end
46
+
36
47
  private
37
48
 
38
49
  def match(expected, actual)
39
50
  return match_captures(expected, actual) if @expected_captures
40
51
  return true if values_match?(expected, actual)
52
+ return false if Array === expected
41
53
  return false unless can_safely_call_match?(expected, actual)
42
54
  actual.match(expected)
43
55
  end
@@ -467,11 +467,12 @@ module RSpec
467
467
  @chained_method_clauses = []
468
468
  @block_arg = block_arg
469
469
 
470
- klass = class << self
471
- # See `Macros#define_user_override` above, for an explanation.
472
- include(@user_method_defs = Module.new)
473
- self
474
- end
470
+ klass =
471
+ class << self
472
+ # See `Macros#define_user_override` above, for an explanation.
473
+ include(@user_method_defs = Module.new)
474
+ self
475
+ end
475
476
  RSpec::Support::WithKeywordsWhenNeeded.class_exec(klass, *expected, &declarations)
476
477
  end
477
478
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,22 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-expectations
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.2
4
+ version: 3.13.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Baker
8
8
  - David Chelimsky
9
9
  - Myron Marston
10
- autorequire:
11
10
  bindir: bin
12
11
  cert_chain:
13
12
  - |
14
13
  -----BEGIN CERTIFICATE-----
15
- MIIF1TCCA72gAwIBAgIJAPXjfUbCjdXUMA0GCSqGSIb3DQEBBQUAMIGAMQswCQYD
14
+ MIIFvjCCA6agAwIBAgIJAPXjfUbCjdXVMA0GCSqGSIb3DQEBCwUAMIGAMQswCQYD
16
15
  VQQGEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEO
17
16
  MAwGA1UECgwFUlNwZWMxEzARBgNVBAMMCnJzcGVjLmluZm8xJTAjBgkqhkiG9w0B
18
- CQEWFnJzcGVjQGdvb2dsZWdyb3Vwcy5jb20wHhcNMTQxMjIzMDkzNTIyWhcNMjQx
19
- MjIyMDkzNTIyWjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24x
17
+ CQEWFnJzcGVjQGdvb2dsZWdyb3Vwcy5jb20wHhcNMjUwMjA2MTE0NjU2WhcNMjYw
18
+ MjA2MTE0NjU2WjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24x
20
19
  EDAOBgNVBAcMB1NlYXR0bGUxDjAMBgNVBAoMBVJTcGVjMRMwEQYDVQQDDApyc3Bl
21
20
  Yy5pbmZvMSUwIwYJKoZIhvcNAQkBFhZyc3BlY0Bnb29nbGVncm91cHMuY29tMIIC
22
21
  IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsSmjgcHaKlD0jizRJowi2bGI
@@ -30,22 +29,21 @@ cert_chain:
30
29
  Xeh3EVdWY3vMB1pkhPwlsenpcmj5gOzrd54lELOVbCGHCf48iSqeflY2Lhe0pvzK
31
30
  blXCJBDmtrebvus291rM/dHcbEfK1SVd5Wut/n131iouf6dnNCFskFygDcgBbthC
32
31
  gpEMqf80lEmhX59VUsm0Pv6OEo+ZPHBvXPiJA6DShQh9t3YtpwyA8uVDMbT/i32u
33
- 2FUsqZbbJcCmkBrGposCAwEAAaNQME4wHQYDVR0OBBYEFPPvQ5XT0Nvuhi6k+hrW
34
- Vv35J+TeMB8GA1UdIwQYMBaAFPPvQ5XT0Nvuhi6k+hrWVv35J+TeMAwGA1UdEwQF
35
- MAMBAf8wDQYJKoZIhvcNAQEFBQADggIBAIqbQSWH2aAF537DKwAMB8nMFsoe24MD
36
- gtuQAyjTtbH+QBE4N2RdQF/sU7Y3PYR7nqdrCsYc3RxyqM5XXi7I3IYdpfe1RuxY
37
- +pyPzVQsPPDhMlJlCrwJsADnxlpxZlAgxYSLKOan55ihscaAWA90wqRUrf/ZJM36
38
- 8LWCPVn5teIt5aaxZWX68RMxa+AXvpbtJOBwXLkIFk3apD8CX4DhelIdw67DbkUe
39
- ghUd/u62qrnqBTVgditt7OoWIZjzh24/Fda5d0MxZyvLILGOrf5bN4cTbe/q9Cid
40
- Xrik7Upm+mu3y3yQIfrw85xybHq6iNXyYHvCdSrFfCIKrGpd/0CAdmYnJlx59Fk/
41
- UbD3Eyx4psBSkU+WKO0Uf+3zNI7N/nVeNIwU/Ft+l8l7/K+427656c+ZGWDO0Gt/
42
- BeEOSTDKP7qQ1T+JvMrBcBQo+i0cnRT10J1aoV90BhxsvWTRizIbugbaqR6Tq3bj
43
- Akt00cIlNSplL6DenIAKSh5kF7s0tRD0tC3bNkZmNjNGkdoGEcUODEpTB3RHKKiu
44
- e6k2Jg6m00z5vGFQhOnROG/QaUzMA3A3mFBe1RHFo07xd0pFeoeWL3vF69Gx9Jwp
45
- ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
46
- F3MdtaDehhjC
32
+ 2FUsqZbbJcCmkBrGposCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
33
+ HQYDVR0OBBYEFPPvQ5XT0Nvuhi6k+hrWVv35J+TeMA0GCSqGSIb3DQEBCwUAA4IC
34
+ AQBGBr0ll2yLrkO6IeK5Q7qZFnANaUCKfi6Of9VztZJXgKAU5KAQxyOidGktoA5N
35
+ lp+bFKudRkW8jSehqoNaNBdSZ9Bc07EGMXIhUFJZF9rq7Z2SKPwUm6EaSsBK13QR
36
+ U4K6wuaw5ZJSFzklapoGOJRGnFlnNtlhNFY6+tTwCeblwZbcuYGyGY8+Rg7GbyVl
37
+ 3Tr4Gi1aS/qG/MDXKdE8HWm39dmaAMdbw6dg1VBd0JrX2VqH7xvE1dM/D3OlKrNp
38
+ gNFRNJig3Y8qPjocZR0cGkhgZoC9wribWxHSNawZm4CoV3fja2HNx9QyM7BaB+as
39
+ yuqAiBbA7vBcyc8nKATip3mxbyXYXoDD7nmO8JCPP7O/WsgG+U/B2a0kPdvYFoxE
40
+ Q0Js3GtFCuMvL+0rifqdxBOLtu0Pw9q4RvToTJIl2IR6eTgCb82B1hw9qKf7PjuL
41
+ BoEsYjjDhGw6FZvcJG8O6uj7aB+z4aF21YR74UGL7sq/RIPNNez5JI95jTGfqCPy
42
+ 6yo0w3zja3yg28QK3Fj+tbOHeSLv9SDQWi/1jiPprGzbxGvbVvjvX11YZc46vkmY
43
+ AwP+qZPPf97FXXZGEGIYhhHpnj+Ltx9nCetRPiZ4rvYBcXgCWVQSg6eiEofrMwn/
44
+ AKMCABhZ1Y2eATsfMgdkmIZk7JIPZiSi6eUxPiCMP9M/pw==
47
45
  -----END CERTIFICATE-----
48
- date: 2024-08-20 00:00:00.000000000 Z
46
+ date: 2025-05-01 00:00:00.000000000 Z
49
47
  dependencies:
50
48
  - !ruby/object:Gem::Dependency
51
49
  name: rspec-support
@@ -81,62 +79,6 @@ dependencies:
81
79
  - - "<"
82
80
  - !ruby/object:Gem::Version
83
81
  version: '2.0'
84
- - !ruby/object:Gem::Dependency
85
- name: aruba
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - "~>"
89
- - !ruby/object:Gem::Version
90
- version: 0.14.10
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - "~>"
96
- - !ruby/object:Gem::Version
97
- version: 0.14.10
98
- - !ruby/object:Gem::Dependency
99
- name: cucumber
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: '1.3'
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: '1.3'
112
- - !ruby/object:Gem::Dependency
113
- name: minitest
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - "~>"
117
- - !ruby/object:Gem::Version
118
- version: '5.2'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - "~>"
124
- - !ruby/object:Gem::Version
125
- version: '5.2'
126
- - !ruby/object:Gem::Dependency
127
- name: rake
128
- requirement: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - ">"
131
- - !ruby/object:Gem::Version
132
- version: 10.0.0
133
- type: :development
134
- prerelease: false
135
- version_requirements: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - ">"
138
- - !ruby/object:Gem::Version
139
- version: 10.0.0
140
82
  description: rspec-expectations provides a simple, readable API to express expected
141
83
  outcomes of a code example.
142
84
  email: rspec@googlegroups.com
@@ -203,11 +145,10 @@ licenses:
203
145
  - MIT
204
146
  metadata:
205
147
  bug_tracker_uri: https://github.com/rspec/rspec-expectations/issues
206
- changelog_uri: https://github.com/rspec/rspec-expectations/blob/v3.13.2/Changelog.md
148
+ changelog_uri: https://github.com/rspec/rspec-expectations/blob/v3.13.4/Changelog.md
207
149
  documentation_uri: https://rspec.info/documentation/
208
150
  mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
209
151
  source_code_uri: https://github.com/rspec/rspec-expectations
210
- post_install_message:
211
152
  rdoc_options:
212
153
  - "--charset=UTF-8"
213
154
  require_paths:
@@ -223,8 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
164
  - !ruby/object:Gem::Version
224
165
  version: '0'
225
166
  requirements: []
226
- rubygems_version: 3.4.19
227
- signing_key:
167
+ rubygems_version: 3.6.2
228
168
  specification_version: 4
229
- summary: rspec-expectations-3.13.2
169
+ summary: rspec-expectations-3.13.4
230
170
  test_files: []
metadata.gz.sig CHANGED
Binary file