rspec-mocks 3.13.1 → 3.13.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4544a3c8c297ac01db63f9b354adc42f23cb91b635bb8a3c786190e305067036
4
- data.tar.gz: 7e854083561be7cab34ab290abca139f94636785b5eaa5d01a797c32276e8397
3
+ metadata.gz: 1ec56fe2f767262115b40aed338c0efccd4aa244cb5ce913e411a9952ec361fe
4
+ data.tar.gz: 744db38397a2f425482391df2f6a230396a4d67bbf52f42c383d57862d8415b1
5
5
  SHA512:
6
- metadata.gz: dde5e6722136c724658ddc5df5875e6cc39039ea92c42d0758aa85ad7ee644a727afa94c89bee728be523c2dda7505ff648f960c6712d5077e8c88d721377d2d
7
- data.tar.gz: d1495943f3c1d06bff956b321bf4359dcbcf04b9541d6ed11ca2f5bdc92fd455b40142f071258f17f3016ba5cc7700a7af03ee4115041c6386396280354a23b6
6
+ metadata.gz: 2813849f49563f48798d2e84f0139875eb1840d79ca6f295b30182d7c501047c2ab33463fb93f3eca31b31b6e861d8497b810a632fbb1461f63caf5ed338903d
7
+ data.tar.gz: f3ab9c0db0a688dce4ae84e4e2ed8f31980bcbec6bb98acc9889bcf6ac3d4e1707e6146b22e4889a348aba4ec602f97e9f1342967154ee452ea4a0f41ea008bd
checksums.yaml.gz.sig CHANGED
Binary file
data/Changelog.md CHANGED
@@ -1,5 +1,42 @@
1
1
  ### Development
2
- [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.13.1...3-13-maintennace)
2
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.5...3-13-maintenance)
3
+
4
+ ### 3.13.5 / 2025-05-27
5
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.4...rspec-mocks-v3.13.5)
6
+
7
+ Bug Fixes:
8
+
9
+ * Fix regression where a previous fix (rspec/rspec#214) would leave behind thread data
10
+ between tests. (Jon Rowe, rspec/rspec#219)
11
+ * Fix links in gemspec to point to monorepo / homepage. (Jon Rowe)
12
+
13
+ ### 3.13.4 / 2025-05-05
14
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.3...rspec-mocks-v3.13.4)
15
+
16
+ Bug Fixes:
17
+
18
+ * Fix regression where nested stubbed method calls would inadvertently not be counted.
19
+ (Jon Rowe, rspec/rspec#214)
20
+ * Fix regression where keyword arguments would not be passed through to nested stubbed
21
+ method calls. (Jon Rowe, rspec/rspec#214)
22
+
23
+ ### 3.13.3 / 2025-05-01
24
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.2...rspec-mocks-v3.13.3)
25
+
26
+ Bug Fixes:
27
+
28
+ * When stubbing methods using the `expect_any_instance_of` or `allow_any_instance_of`
29
+ ensure the stubbed method has the same visibility as the real method.
30
+ (Jon Rowe, rspec/rspec-mocks#1596)
31
+ * Prevent recursive calls to stubbed methods during stub invocation.
32
+ (James Dabbs, rspec/rspec#116, rspec/rspec#156)
33
+
34
+ ### 3.13.2 / 2024-10-02
35
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.13.1...v3.13.2)
36
+
37
+ Bug Fixes:
38
+
39
+ * Support keyword arguments in callables passed to `and_invoke`. (Jon Rowe, rspec/rspec-mocks#1595)
3
40
 
4
41
  ### 3.13.1 / 2024-05-08
5
42
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.13.0...v3.13.1)
@@ -7,21 +44,21 @@
7
44
  Bug Fixes:
8
45
 
9
46
  * Use `RSpec::Support::Mutex` in `RSpec::Mocks::Proxy` to avoid issues from
10
- stubbing `::Mutex#new`. (Eric Mueller, #1575)
47
+ stubbing `::Mutex#new`. (Eric Mueller, rspec/rspec-mocks#1575)
11
48
 
12
49
  ### 3.13.0 / 2024-02-04
13
50
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.7...v3.13.0)
14
51
 
15
52
  Enhancements:
16
53
 
17
- * Add an `array_excluding` matcher for arguments. (Zane Wolfgang Pickett, #1528)
54
+ * Add an `array_excluding` matcher for arguments. (Zane Wolfgang Pickett, rspec/rspec-mocks#1528)
18
55
 
19
56
  ### 3.12.7 / 2024-02-04
20
57
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.6...v3.12.7)
21
58
 
22
59
  Bug Fixes:
23
60
 
24
- * Reduce allocations from "any_instance" style mocks. (Carlos Palhares, #1479)
61
+ * Reduce allocations from "any_instance" style mocks. (Carlos Palhares, rspec/rspec-mocks#1479)
25
62
 
26
63
  ### 3.12.6 / 2023-07-11
27
64
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.5...v3.12.6)
@@ -29,7 +66,7 @@ Bug Fixes:
29
66
  Bug Fixes:
30
67
 
31
68
  * Fix an issue with `and_call_original` when using the `method_missing` fallback
32
- with keyword arguments. (Igor Drozdov, #1552)
69
+ with keyword arguments. (Igor Drozdov, rspec/rspec-mocks#1552)
33
70
 
34
71
  ### 3.12.5 / 2023-03-30
35
72
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.4...v3.12.5)
@@ -37,16 +74,16 @@ Bug Fixes:
37
74
  Bug Fixes:
38
75
 
39
76
  * Fix compatibility issue with Rails where active_support monkey patches `with`
40
- when using any instance. (Lachlan Sylvester, #1540)
77
+ when using any instance. (Lachlan Sylvester, rspec/rspec-mocks#1540)
41
78
 
42
79
  ### 3.12.4 / 2023-03-12
43
80
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.3...v3.12.4)
44
81
 
45
82
  Bug Fixes:
46
83
 
47
- * Fix an issue with asserting that Array#reverse is never called. (Brad Trick, #1533)
84
+ * Fix an issue with asserting that Array#reverse is never called. (Brad Trick, rspec/rspec-mocks#1533)
48
85
  * Fix compatibility issue with Rails where active_support monkey patches `with`.
49
- (Jean Boussier, #1531, #1534)
86
+ (Jean Boussier, rspec/rspec-mocks#1531, rspec/rspec-mocks#1534)
50
87
 
51
88
  ### 3.12.3 / 2023-01-17
52
89
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.2...v3.12.3)
@@ -54,7 +91,7 @@ Bug Fixes:
54
91
  Bug Fixes:
55
92
 
56
93
  * Fix keyword delegation in `send` for verifying doubles on Ruby 3.
57
- (Charlie Honig, #1485)
94
+ (Charlie Honig, rspec/rspec-mocks#1485)
58
95
 
59
96
  ### 3.12.2 / 2023-01-07
60
97
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.1...v3.12.2)
@@ -62,24 +99,24 @@ Bug Fixes:
62
99
  Bug Fixes:
63
100
 
64
101
  * Fix implementation blocks for mocks using keyword arguments on Ruby 3.2.0.
65
- (Adam Steel, #1508)
102
+ (Adam Steel, rspec/rspec-mocks#1508)
66
103
  * Fix keyword argument assertions when mocking using `with` on Ruby 3.2.0.
67
- (Slava Kardakov, Benoit Tigeot, Phil Pirozhkov, Benoit Daloze, #1514)
104
+ (Slava Kardakov, Benoit Tigeot, Phil Pirozhkov, Benoit Daloze, rspec/rspec-mocks#1514)
68
105
 
69
106
  ### 3.12.1 / 2022-12-10
70
107
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.0...v3.12.1)
71
108
 
72
109
  Bug Fixes:
73
110
 
74
- * Remove empty diff marker when a diff only contains console codes. (Jon Rowe, #1506)
75
- * Show keyword vs hash diff marker when arguments are not `==` (Jon Rowe, #1506)
111
+ * Remove empty diff marker when a diff only contains console codes. (Jon Rowe, rspec/rspec-mocks#1506)
112
+ * Show keyword vs hash diff marker when arguments are not `==` (Jon Rowe, rspec/rspec-mocks#1506)
76
113
  * Change check to detect frozen objects to rescue errors rather than
77
114
  pre-empting by checking `frozen?` due to some objects mis-behaving.
78
- (Keegan Roth, #1401)
115
+ (Keegan Roth, rspec/rspec-mocks#1401)
79
116
  * Prevent unfulfilled expectations using `expect_any_instance_of` across a class
80
- inheritance boundary from raising rather than failing. (Jon Rowe, #1496)
117
+ inheritance boundary from raising rather than failing. (Jon Rowe, rspec/rspec-mocks#1496)
81
118
  * Prevent a misleading error message when using `allow(...).not_to` with
82
- unsupported matchers. (Phil Pirozhkov, #1503)
119
+ unsupported matchers. (Phil Pirozhkov, rspec/rspec-mocks#1503)
83
120
 
84
121
  ### 3.12.0 / 2022-10-26
85
122
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.2...v3.12.0)
@@ -87,7 +124,7 @@ Bug Fixes:
87
124
  Enhancements:
88
125
 
89
126
  * Improve diff output when diffing keyword arguments against hashes.
90
- (Jean Boussier, #1461)
127
+ (Jean Boussier, rspec/rspec-mocks#1461)
91
128
 
92
129
  ### 3.11.2 / 2022-10-25
93
130
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.1...v3.11.2)
@@ -96,9 +133,9 @@ Bug Fixes:
96
133
 
97
134
  * Use the original implementation of `Class.new` to detect overridden definitions
98
135
  of `new` rather than the owner, fixing detection of "double aliased" methods
99
- in Ruby 3 and above. (Benoit Daloze, #1470, #1476)
136
+ in Ruby 3 and above. (Benoit Daloze, rspec/rspec-mocks#1470, rspec/rspec-mocks#1476)
100
137
  * Support keyword argument semantics when constraining argument expectations using
101
- `with` on Ruby 3.0+ with `instance_double` (Andrii Malyshko, #1473)
138
+ `with` on Ruby 3.0+ with `instance_double` (Andrii Malyshko, rspec/rspec-mocks#1473)
102
139
 
103
140
  ### 3.11.1 / 2022-03-31
104
141
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.0...v3.11.1)
@@ -107,7 +144,7 @@ Bug Fixes:
107
144
 
108
145
  * Add extra `ruby2_keywords` calls to properly designate methods using
109
146
  `*args` to pass keyword around, fixes an issue with TruffleRuby.
110
- (Benoit Daloze, #1464)
147
+ (Benoit Daloze, rspec/rspec-mocks#1464)
111
148
 
112
149
  ### 3.11.0 / 2022-02-09
113
150
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.3...v3.11.0)
@@ -115,16 +152,16 @@ Bug Fixes:
115
152
  Enhancements:
116
153
 
117
154
  * Add `and_invoke` implementation for configuring responses to `receive`
118
- (and `receive_messages`) with multiple callable objects. (Kyle Smith, #1411)
155
+ (and `receive_messages`) with multiple callable objects. (Kyle Smith, rspec/rspec-mocks#1411)
119
156
 
120
157
  ### 3.10.3 / 2022-01-28
121
158
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.2...v3.10.3)
122
159
 
123
160
  Bug Fixes:
124
161
 
125
- * Suppress warning by setting `$VERBOSE` to nil. (Nobuyoshi Nakada, #1414)
162
+ * Suppress warning by setting `$VERBOSE` to nil. (Nobuyoshi Nakada, rspec/rspec-mocks#1414)
126
163
  * Support keyword argument semantics when constraining argument expectations using
127
- `with` on Ruby 3.0+ (Yusuke Endoh, #1394)
164
+ `with` on Ruby 3.0+ (Yusuke Endoh, rspec/rspec-mocks#1394)
128
165
 
129
166
  ### 3.10.2 / 2021-01-27
130
167
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.1...v3.10.2)
@@ -132,12 +169,12 @@ Bug Fixes:
132
169
  Bug Fixes:
133
170
 
134
171
  * Support keyword arguments with `and_call_original` on Ruby 3.0.
135
- (Bryan Powell, #1385)
172
+ (Bryan Powell, rspec/rspec-mocks#1385)
136
173
  * `RSpec::Mocks::Constant#previously_defined?` is now always a boolean.
137
- (Phil Pirozhkov, #1397)
174
+ (Phil Pirozhkov, rspec/rspec-mocks#1397)
138
175
  * Support keyword arguments on Ruby 3.0 when used with `expect_any_instance_of`
139
176
  or `allow_any_instance_of` with `and_call_original`.
140
- (Jess Hottenstein, #1407)
177
+ (Jess Hottenstein, rspec/rspec-mocks#1407)
141
178
 
142
179
  ### 3.10.1 / 2020-12-27
143
180
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.0...v3.10.1)
@@ -145,7 +182,7 @@ Bug Fixes:
145
182
  Bug Fixes:
146
183
 
147
184
  * Issue `ArgumentError` rather than `TypeError` when unsupported methods on
148
- unsupported objects are attempted to be stubbed. (@zhisme, #1357)
185
+ unsupported objects are attempted to be stubbed. (@zhisme, rspec/rspec-mocks#1357)
149
186
 
150
187
  ### 3.10.0 / 2020-10-30
151
188
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.9.1...v3.10.0)
@@ -153,9 +190,9 @@ Bug Fixes:
153
190
  Enhancements:
154
191
  * Add the ability to set a custom error generator in `MessageExpectation`.
155
192
  This will allow rspec-expectations to inject a custom failure message.
156
- (Benoit Tigeot and Nicolas Zermati, #1312)
193
+ (Benoit Tigeot and Nicolas Zermati, rspec/rspec-mocks#1312)
157
194
  * Return the result of the block passed to `RSpec::Mocks.with_temporary_scope`
158
- when block run. (@expeehaa, #1329)
195
+ when block run. (@expeehaa, rspec/rspec-mocks#1329)
159
196
 
160
197
  ### 3.9.1 / 2019-12-31
161
198
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.9.0...v3.9.1)
@@ -163,7 +200,7 @@ Enhancements:
163
200
  Bug Fixes:
164
201
 
165
202
  * Trigger `RSpec::Mocks.configuration.verifying_double_callbacks` when using
166
- `allow_any_instance_of` or `expect_any_instance_of` (Daniel Orner, #1309)
203
+ `allow_any_instance_of` or `expect_any_instance_of` (Daniel Orner, rspec/rspec-mocks#1309)
167
204
 
168
205
  ### 3.9.0 / 2019-10-07
169
206
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.8.2...v3.9.0)
@@ -171,16 +208,16 @@ Bug Fixes:
171
208
  Enhancements:
172
209
 
173
210
  * Improve thread safety of message expectations by using Mutex to prevent
174
- deadlocking errors. (Ry Biesemeyer, #1236)
211
+ deadlocking errors. (Ry Biesemeyer, rspec/rspec-mocks#1236)
175
212
  * Add the ability to use `time` as an alias for `times`. For example:
176
213
  `expect(Class).to receive(:method).exactly(1).time`.
177
- (Pistos, Benoit Tigeot, #1271)
214
+ (Pistos, Benoit Tigeot, rspec/rspec-mocks#1271)
178
215
 
179
216
  ### 3.8.2 / 2019-10-02
180
217
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.8.1...v3.8.2)
181
218
 
182
219
  * Allow `array_including` argument matchers to be nested.
183
- (Emmanuel Delmas, #1291)
220
+ (Emmanuel Delmas, rspec/rspec-mocks#1291)
184
221
 
185
222
  ### 3.8.1 / 2019-06-13
186
223
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.8.0...v3.8.1)
@@ -188,7 +225,7 @@ Enhancements:
188
225
  Bug Fixes:
189
226
 
190
227
  * Ensure stubbing methods does not change their visibility.
191
- (Kevin Boschert, #1277)
228
+ (Kevin Boschert, rspec/rspec-mocks#1277)
192
229
 
193
230
  ### 3.8.0 / 2018-08-04
194
231
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.7.0...v3.8.0)
@@ -196,12 +233,12 @@ Bug Fixes:
196
233
  Bug Fixes:
197
234
 
198
235
  * Issue error when encountering invalid "counted" negative message expectations.
199
- (Sergiy Yarinovskiy, #1212)
236
+ (Sergiy Yarinovskiy, rspec/rspec-mocks#1212)
200
237
  * Ensure `allow_any_instance_of` and `expect_any_instance_of` can be temporarily
201
- supressed. (Jon Rowe, #1228)
238
+ supressed. (Jon Rowe, rspec/rspec-mocks#1228)
202
239
  * Ensure `expect_any_instance_of(double).to_not have_received(:some_method)`
203
240
  fails gracefully (as its not supported) rather than issuing a `NoMethodError`.
204
- (Maxim Krizhanovsky, #1231)
241
+ (Maxim Krizhanovsky, rspec/rspec-mocks#1231)
205
242
 
206
243
  ### 3.7.0 / 2017-10-17
207
244
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.6.0...v3.7.0)
@@ -209,12 +246,12 @@ Bug Fixes:
209
246
  Enhancements:
210
247
 
211
248
  * Improve compatibility with `--enable-frozen-string-literal` option
212
- on Ruby 2.3+. (Pat Allan, #1165)
249
+ on Ruby 2.3+. (Pat Allan, rspec/rspec-mocks#1165)
213
250
 
214
251
  Bug Fixes:
215
252
 
216
253
  * Fix `hash_including` and `hash_excluding` so that they work against
217
- subclasses of `Hash`. (Aaron Rosenberg, #1167)
254
+ subclasses of `Hash`. (Aaron Rosenberg, rspec/rspec-mocks#1167)
218
255
 
219
256
  ### 3.6.0 / 2017-05-04
220
257
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.6.0.beta2...v3.6.0)
@@ -222,11 +259,11 @@ Bug Fixes:
222
259
  Bug Fixes:
223
260
 
224
261
  * Fix "instance variable @color not initialized" warning when using
225
- rspec-mocks without rspec-core. (Myron Marston, #1142)
262
+ rspec-mocks without rspec-core. (Myron Marston, rspec/rspec-mocks#1142)
226
263
  * Restore aliased module methods properly when stubbing on 1.8.7.
227
- (Samuel Giddins, #1144)
264
+ (Samuel Giddins, rspec/rspec-mocks#1144)
228
265
  * Allow a message chain expectation to be constrained by argument(s).
229
- (Jon Rowe, #1156)
266
+ (Jon Rowe, rspec/rspec-mocks#1156)
230
267
 
231
268
  ### 3.6.0.beta2 / 2016-12-12
232
269
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.6.0.beta1...v3.6.0.beta2)
@@ -235,16 +272,16 @@ Enhancements:
235
272
 
236
273
  * Add new `without_partial_double_verification { }` API that lets you
237
274
  temporarily turn off partial double verification for an example.
238
- (Jon Rowe, #1104)
275
+ (Jon Rowe, rspec/rspec-mocks#1104)
239
276
 
240
277
  ### 3.6.0.beta1 / 2016-10-09
241
278
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0...v3.6.0.beta1)
242
279
 
243
280
  Bug Fixes:
244
281
 
245
- * Return the test double instance form `#freeze` (Alessandro Berardi, #1109)
282
+ * Return the test double instance form `#freeze` (Alessandro Berardi, rspec/rspec-mocks#1109)
246
283
  * Allow the special logic for stubbing `new` to work when `<Class>.method` has
247
- been redefined. (Proby, #1119)
284
+ been redefined. (Proby, rspec/rspec-mocks#1119)
248
285
 
249
286
  ### 3.5.0 / 2016-07-01
250
287
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta4...v3.5.0)
@@ -252,14 +289,14 @@ Bug Fixes:
252
289
  Enhancements:
253
290
 
254
291
  * Provides a nice string representation of
255
- `RSpec::Mocks::MessageExpectation` (Myron Marston, #1095)
292
+ `RSpec::Mocks::MessageExpectation` (Myron Marston, rspec/rspec-mocks#1095)
256
293
 
257
294
  ### 3.5.0.beta4 / 2016-06-05
258
295
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta3...v3.5.0.beta4)
259
296
 
260
297
  Enhancements:
261
298
 
262
- * Add `and_throw` to any instance handling. (Tobias Bühlmann, #1068)
299
+ * Add `and_throw` to any instance handling. (Tobias Bühlmann, rspec/rspec-mocks#1068)
263
300
 
264
301
  ### 3.5.0.beta3 / 2016-04-02
265
302
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta2...v3.5.0.beta3)
@@ -267,9 +304,9 @@ Enhancements:
267
304
  Enhancements:
268
305
 
269
306
  * Issue warning when attempting to use unsupported
270
- `allow(...).to receive(...).ordered`. (Jon Rowe, #1000)
307
+ `allow(...).to receive(...).ordered`. (Jon Rowe, rspec/rspec-mocks#1000)
271
308
  * Add `rspec/mocks/minitest_integration`, to properly integrate rspec-mocks
272
- with minitest. (Myron Marston, #1065)
309
+ with minitest. (Myron Marston, rspec/rspec-mocks#1065)
273
310
 
274
311
  ### 3.5.0.beta2 / 2016-03-10
275
312
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta1...v3.5.0.beta2)
@@ -277,12 +314,12 @@ Enhancements:
277
314
  Enhancements:
278
315
 
279
316
  * Improve error message displayed when using `and_wrap_original` on pure test
280
- doubles. (betesh, #1063)
317
+ doubles. (betesh, rspec/rspec-mocks#1063)
281
318
 
282
319
  Bug Fixes:
283
320
 
284
321
  * Fix issue that prevented `receive_message_chain(...).with(...)` working
285
- correctly on "any instance" mocks. (Jon Rowe, #1061)
322
+ correctly on "any instance" mocks. (Jon Rowe, rspec/rspec-mocks#1061)
286
323
 
287
324
  ### 3.5.0.beta1 / 2016-02-06
288
325
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.4.1...v3.5.0.beta1)
@@ -290,20 +327,20 @@ Bug Fixes:
290
327
  Bug Fixes:
291
328
 
292
329
  * Allow `any_instance_of(...).to receive(...)` to use `and_yield` multiple
293
- times. (Kilian Cirera Sant, #1054)
330
+ times. (Kilian Cirera Sant, rspec/rspec-mocks#1054)
294
331
  * Allow matchers which inherit from `rspec-mocks` matchers to be used for
295
- `allow`. (Andrew Kozin, #1056)
332
+ `allow`. (Andrew Kozin, rspec/rspec-mocks#1056)
296
333
  * Prevent stubbing `respond_to?` on partial doubles from causing infinite
297
- recursion. (Jon Rowe, #1013)
334
+ recursion. (Jon Rowe, rspec/rspec-mocks#1013)
298
335
  * Prevent aliased methods from disapearing after being mocked with
299
- `any_instance` (regression from #1043). (Joe Rafaniello, #1060)
336
+ `any_instance` (regression from rspec/rspec-mocks#1043). (Joe Rafaniello, rspec/rspec-mocks#1060)
300
337
 
301
338
  ### 3.4.1 / 2016-01-10
302
339
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.4.0...v3.4.1)
303
340
 
304
341
  Bug Fixes:
305
342
 
306
- * Fix `any_instance` to work properly on Ruby 2.3. (Joe Rafaniello, #1043)
343
+ * Fix `any_instance` to work properly on Ruby 2.3. (Joe Rafaniello, rspec/rspec-mocks#1043)
307
344
 
308
345
  ### 3.4.0 / 2015-11-11
309
346
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.2...v3.4.0)
@@ -311,18 +348,18 @@ Bug Fixes:
311
348
  Enhancements:
312
349
 
313
350
  * Make `expect(...).to have_received` work without relying upon
314
- rspec-expectations. (Myron Marston, #978)
351
+ rspec-expectations. (Myron Marston, rspec/rspec-mocks#978)
315
352
  * Add option for failing tests when expectations are set on `nil`.
316
- (Liz Rush, #983)
353
+ (Liz Rush, rspec/rspec-mocks#983)
317
354
 
318
355
  Bug Fixes:
319
356
 
320
357
  * Fix `have_received { ... }` so that any block passed when the message
321
- was received is forwarded to the `have_received` block. (Myron Marston, #1006)
358
+ was received is forwarded to the `have_received` block. (Myron Marston, rspec/rspec-mocks#1006)
322
359
  * Fix infinite loop in error generator when stubbing `respond_to?`.
323
- (Alex Dowad, #1022)
360
+ (Alex Dowad, rspec/rspec-mocks#1022)
324
361
  * Fix issue with using `receive` on subclasses (at a class level) with 1.8.7.
325
- (Alex Dowad, #1026)
362
+ (Alex Dowad, rspec/rspec-mocks#1026)
326
363
 
327
364
  ### 3.3.2 / 2015-07-15
328
365
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.1...v3.3.2)
@@ -330,7 +367,7 @@ Bug Fixes:
330
367
  Bug Fixes:
331
368
 
332
369
  * Prevent thread deadlock errors during proxy creation (e.g. when using
333
- `before_verifying_doubles` callbacks). (Jon Rowe, #980, #979)
370
+ `before_verifying_doubles` callbacks). (Jon Rowe, rspec/rspec-mocks#980, rspec/rspec-mocks#979)
334
371
 
335
372
  ### 3.3.1 / 2015-06-19
336
373
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.0...v3.3.1)
@@ -340,7 +377,7 @@ Bug Fixes:
340
377
  * Fix bug in `before_verifying_double` callback logic that caused it to be called
341
378
  once for each class in the ancestor list when mocking or stubbing a class. Now
342
379
  it is only called for the mocked or stubbed class, as you would expect. (Sam
343
- Phippen, #974)
380
+ Phippen, rspec/rspec-mocks#974)
344
381
 
345
382
  ### 3.3.0 / 2015-06-12
346
383
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.2.1...v3.3.0)
@@ -349,45 +386,45 @@ Enhancements:
349
386
 
350
387
  * When stubbing `new` on `MyClass` or `class_double(MyClass)`, use the
351
388
  method signature from `MyClass#initialize` to verify arguments.
352
- (Myron Marston, #886)
389
+ (Myron Marston, rspec/rspec-mocks#886)
353
390
  * Use matcher descriptions when generating description of received arguments
354
- for mock expectation failures. (Tim Wade, #891)
355
- * Avoid loading `stringio` unnecessarily. (Myron Marston, #894)
391
+ for mock expectation failures. (Tim Wade, rspec/rspec-mocks#891)
392
+ * Avoid loading `stringio` unnecessarily. (Myron Marston, rspec/rspec-mocks#894)
356
393
  * Verifying doubles failure messages now distinguish between class and instance
357
- level methods. (Tim Wade, #896, #908)
394
+ level methods. (Tim Wade, rspec/rspec-mocks#896, rspec/rspec-mocks#908)
358
395
  * Improve mock expectation failure messages so that it combines both
359
- number of times and the received arguments in the output. (John Ceh, #918)
396
+ number of times and the received arguments in the output. (John Ceh, rspec/rspec-mocks#918)
360
397
  * Improve how test doubles are represented in failure messages.
361
- (Siva Gollapalli, Myron Marston, #932)
398
+ (Siva Gollapalli, Myron Marston, rspec/rspec-mocks#932)
362
399
  * Rename `RSpec::Mocks::Configuration#when_declaring_verifying_double` to
363
400
  `RSpec::Mocks::Configuration#before_verifying_doubles` and utilise when
364
- verifying partial doubles. (Jon Rowe, #940)
401
+ verifying partial doubles. (Jon Rowe, rspec/rspec-mocks#940)
365
402
  * Use rspec-support's `ObjectFormatter` for improved formatting of
366
403
  arguments in failure messages so that, for example, full time
367
- precisions is displayed for time objects. (Gavin Miller, Myron Marston, #955)
404
+ precisions is displayed for time objects. (Gavin Miller, Myron Marston, rspec/rspec-mocks#955)
368
405
 
369
406
  Bug Fixes:
370
407
 
371
408
  * Ensure expectations that raise eagerly also raise during RSpec verification.
372
409
  This means that if exceptions are caught inside test execution the test will
373
- still fail. (Sam Phippen, #884)
410
+ still fail. (Sam Phippen, rspec/rspec-mocks#884)
374
411
  * Fix `have_received(msg).with(args).exactly(n).times` and
375
412
  `receive(msg).with(args).exactly(n).times` failure messages
376
413
  for when the message was received the wrong number of times with
377
414
  the specified args, and also received additional times with other
378
415
  arguments. Previously it confusingly listed the arguments as being
379
416
  mis-matched (even when the double was allowed to receive with any
380
- args) rather than listing the count. (John Ceh, #918)
417
+ args) rather than listing the count. (John Ceh, rspec/rspec-mocks#918)
381
418
  * Fix `any_args`/`anything` support so that we avoid calling `obj == anything`
382
419
  on user objects that may have improperly implemented `==` in a way that
383
- raises errors. (Myron Marston, #924)
420
+ raises errors. (Myron Marston, rspec/rspec-mocks#924)
384
421
  * Fix edge case involving stubbing the same method on a class and a subclass
385
- which previously hit a `NoMethodError` internally in RSpec. (Myron Marston #954)
422
+ which previously hit a `NoMethodError` internally in RSpec. (Myron Marston rspec/rspec-mocks#954)
386
423
  * Fix edge case where the message received count would be incremented multiple
387
- times for one failure. (Myron Marston, #957)
424
+ times for one failure. (Myron Marston, rspec/rspec-mocks#957)
388
425
  * Fix failure messages for when spies received the expected message with
389
- different arguments and also received another message. (Maurício Linhares, #960)
390
- * Silence whitespace-only diffs. (Myron Marston, #969)
426
+ different arguments and also received another message. (Maurício Linhares, rspec/rspec-mocks#960)
427
+ * Silence whitespace-only diffs. (Myron Marston, rspec/rspec-mocks#969)
391
428
 
392
429
  ### 3.2.1 / 2015-02-23
393
430
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.2.0...v3.2.1)
@@ -396,11 +433,11 @@ Bug Fixes:
396
433
 
397
434
  * Add missing `rspec/support/differ` require so that rspec-mocks can be
398
435
  used w/o rspec-expectations (which also loads the differ and hided the
399
- fact we forgot to require it). (Myron Marston, #893)
436
+ fact we forgot to require it). (Myron Marston, rspec/rspec-mocks#893)
400
437
  * Revert tracking of received arg mutation (added in 3.2.0 to provide an
401
438
  error in a situation we can't support) as our implementation has side
402
439
  effects on non-standard objects and there's no solution we could come
403
- up with that always works. (Myron Marston, #900)
440
+ up with that always works. (Myron Marston, rspec/rspec-mocks#900)
404
441
 
405
442
  ### 3.2.0 / 2015-02-03
406
443
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.3...v3.2.0)
@@ -408,55 +445,55 @@ Bug Fixes:
408
445
  Enhancements:
409
446
 
410
447
  * Treat `any_args` as an arg splat, allowing it to match an arbitrary
411
- number of args at any point in an arg list. (Myron Marston, #786)
448
+ number of args at any point in an arg list. (Myron Marston, rspec/rspec-mocks#786)
412
449
  * Print diffs when arguments in mock expectations are mismatched.
413
- (Sam Phippen, #751)
450
+ (Sam Phippen, rspec/rspec-mocks#751)
414
451
  * Support names for verified doubles (`instance_double`, `instance_spy`,
415
452
  `class_double`, `class_spy`, `object_double`, `object_spy`). (Cezary
416
- Baginski, #826)
453
+ Baginski, rspec/rspec-mocks#826)
417
454
  * Make `array_including` and `hash_including` argument matchers composable.
418
- (Sam Phippen, #819)
455
+ (Sam Phippen, rspec/rspec-mocks#819)
419
456
  * Make `allow_any_instance_of(...).to receive(...).and_wrap_original`
420
- work. (Ryan Fitzgerald, #869)
457
+ work. (Ryan Fitzgerald, rspec/rspec-mocks#869)
421
458
 
422
459
  Bug Fixes:
423
460
 
424
461
  * Provide a clear error when users wrongly combine `no_args` with
425
462
  additional arguments (e.g. `expect().to receive().with(no_args, 1)`).
426
- (Myron Marston, #786)
463
+ (Myron Marston, rspec/rspec-mocks#786)
427
464
  * Provide a clear error when users wrongly use `any_args` multiple times in the
428
465
  same argument list (e.g. `expect().to receive().with(any_args, 1, any_args)`.
429
- (Myron Marston, #786)
466
+ (Myron Marston, rspec/rspec-mocks#786)
430
467
  * Prevent the error generator from using user object #description methods.
431
- See [#685](https://github.com/rspec/rspec-mocks/issues/685).
432
- (Sam Phippen, #751)
468
+ See [rspec/rspec-mocks#685](https://github.com/rspec/rspec-mocks/issues/685).
469
+ (Sam Phippen, rspec/rspec-mocks#751)
433
470
  * Make verified doubles declared as `(instance|class)_double(SomeConst)`
434
471
  work properly when `SomeConst` has previously been stubbed.
435
472
  `(instance|class)_double("SomeClass")` already worked properly.
436
- (Myron Marston, #824)
473
+ (Myron Marston, rspec/rspec-mocks#824)
437
474
  * Add a matcher description for `receive`, `receive_messages` and
438
- `receive_message_chain`. (Myron Marston, #828)
475
+ `receive_message_chain`. (Myron Marston, rspec/rspec-mocks#828)
439
476
  * Validate invocation args for null object verified doubles.
440
- (Myron Marston, #829)
477
+ (Myron Marston, rspec/rspec-mocks#829)
441
478
  * Fix `RSpec::Mocks::Constant.original` when called with an invalid
442
479
  constant to return an object indicating the constant name is invalid,
443
- rather than blowing up. (Myron Marston, #833)
480
+ rather than blowing up. (Myron Marston, rspec/rspec-mocks#833)
444
481
  * Make `extend RSpec::Mocks::ExampleMethods` on any object work properly
445
482
  to add the rspec-mocks API to that object. Previously, `expect` would
446
- be undefined. (Myron Marston, #846)
483
+ be undefined. (Myron Marston, rspec/rspec-mocks#846)
447
484
  * Fix `require 'rspec/mocks/standalone'` so that it only affects `main`
448
485
  and not every object. It's really only intended to be used in a REPL
449
486
  like IRB, but some gems have loaded it, thinking it needs to be loaded
450
487
  when using rspec-mocks outside the context of rspec-core.
451
- (Myron Marston, #846)
488
+ (Myron Marston, rspec/rspec-mocks#846)
452
489
  * Prevent message expectations from being modified by customization methods
453
- (e.g. `with`) after they have been invoked. (Sam Phippen and Melanie Gilman, #837)
490
+ (e.g. `with`) after they have been invoked. (Sam Phippen and Melanie Gilman, rspec/rspec-mocks#837)
454
491
  * Handle cases where a method stub cannot be removed due to something
455
492
  external to RSpec monkeying with the method definition. This can
456
493
  happen, for example, when you `file.reopen(io)` after previously
457
- stubbing a method on the `file` object. (Myron Marston, #853)
494
+ stubbing a method on the `file` object. (Myron Marston, rspec/rspec-mocks#853)
458
495
  * Provide a clear error when received message args are mutated before
459
- a `have_received(...).with(...)` expectation. (Myron Marston, #868)
496
+ a `have_received(...).with(...)` expectation. (Myron Marston, rspec/rspec-mocks#868)
460
497
 
461
498
  ### 3.1.3 / 2014-10-08
462
499
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.2...v3.1.3)
@@ -464,13 +501,13 @@ Bug Fixes:
464
501
  Bug Fixes:
465
502
 
466
503
  * Correct received messages count when used with `have_received` matcher.
467
- (Jon Rowe, #793)
504
+ (Jon Rowe, rspec/rspec-mocks#793)
468
505
  * Provide a clear error message when you use `allow_any_instance_of(...)` or
469
506
  `expect_any_instance_of(...)` with the `have_received` matcher (they are
470
507
  not intended to be used together and previously caused an odd internal
471
- failure in rspec-mocks). (Jon Rowe, #799).
508
+ failure in rspec-mocks). (Jon Rowe, rspec/rspec-mocks#799).
472
509
  * Fix verified double `with` verification so that it applies to method
473
- stubs. (Myron Marston, #790)
510
+ stubs. (Myron Marston, rspec/rspec-mocks#790)
474
511
 
475
512
  ### 3.1.2 / 2014-09-26
476
513
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.1...v3.1.2)
@@ -479,7 +516,7 @@ Bug Fixes:
479
516
 
480
517
  * Provide a clear error message when you use `allow(...)` with the
481
518
  `have_received` matcher (they are not intended to be used together
482
- and previously caused an odd internal failure in rspec-mocks). (Jon Rowe, #788).
519
+ and previously caused an odd internal failure in rspec-mocks). (Jon Rowe, rspec/rspec-mocks#788).
483
520
 
484
521
  ### 3.1.1 / 2014-09-18
485
522
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.0...v3.1.1)
@@ -487,7 +524,7 @@ Bug Fixes:
487
524
  Bug Fixes:
488
525
 
489
526
  * Prevent included modules being detected as prepended modules on Ruby 2.0
490
- when using `any_instance_of(...)`. (Tony Novak, #781)
527
+ when using `any_instance_of(...)`. (Tony Novak, rspec/rspec-mocks#781)
491
528
 
492
529
  ### 3.1.0 / 2014-09-04
493
530
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.4...v3.1.0)
@@ -496,24 +533,24 @@ Enhancements:
496
533
 
497
534
  * Add spying methods (`spy`, `ìnstance_spy`, `class_spy` and `object_spy`)
498
535
  which create doubles as null objects for use with spying in testing. (Sam
499
- Phippen, #671)
536
+ Phippen, rspec/rspec-mocks#671)
500
537
  * `have_received` matcher will raise "does not implement" errors correctly when
501
- used with verifying doubles and partial doubles. (Xavier Shay, #722)
538
+ used with verifying doubles and partial doubles. (Xavier Shay, rspec/rspec-mocks#722)
502
539
  * Allow matchers to be used in place of keyword arguments in `with`
503
- expectations. (Xavier Shay, #726)
540
+ expectations. (Xavier Shay, rspec/rspec-mocks#726)
504
541
  * Add `thrice` modifier to message expectation interface as a synonym
505
- for `exactly(3).times`. (Dennis Taylor, #753)
542
+ for `exactly(3).times`. (Dennis Taylor, rspec/rspec-mocks#753)
506
543
  * Add more `thrice` synonyms e.g. `.at_least(:thrice)`, `.at_most(:thrice)`,
507
- `receive(...).thrice` and `have_received(...).thrice`. (Jon Rowe, #754)
544
+ `receive(...).thrice` and `have_received(...).thrice`. (Jon Rowe, rspec/rspec-mocks#754)
508
545
  * Add `and_wrap_original` modifier for partial doubles to mutate the
509
- response from a method. (Jon Rowe, #762)
546
+ response from a method. (Jon Rowe, rspec/rspec-mocks#762)
510
547
 
511
548
  Bug Fixes:
512
549
 
513
550
  * Remove `any_number_of_times` from `any_instance` recorders that were
514
- erroneously causing mention of the method in documentation. (Jon Rowe, #760)
551
+ erroneously causing mention of the method in documentation. (Jon Rowe, rspec/rspec-mocks#760)
515
552
  * Prevent included modules being detected as prepended modules on Ruby 2.0.
516
- (Eugene Kenny, #771)
553
+ (Eugene Kenny, rspec/rspec-mocks#771)
517
554
 
518
555
  ### 3.0.4 / 2014-08-14
519
556
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.3...v3.0.4)
@@ -521,7 +558,7 @@ Bug Fixes:
521
558
  Bug Fixes:
522
559
 
523
560
  * Restore `kind_of(x)` to match using `arg.kind_of?(x)` (like RSpec 2)
524
- rather than `x === arg`. (Jon Rowe, #750)
561
+ rather than `x === arg`. (Jon Rowe, rspec/rspec-mocks#750)
525
562
 
526
563
  ### 3.0.3 / 2014-07-21
527
564
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.2...v3.0.3)
@@ -529,10 +566,10 @@ Bug Fixes:
529
566
  Bug Fixes:
530
567
 
531
568
  * `have_received` matcher will raise "does not implement" errors correctly when
532
- used with verifying doubles and partial doubles. (Xavier Shay, #722)
569
+ used with verifying doubles and partial doubles. (Xavier Shay, rspec/rspec-mocks#722)
533
570
  * Make `double.as_null_object.dup` and `double.as_null_object.clone`
534
- make the copies be null objects. (Myron Marston, #732)
535
- * Don't inadvertently define `BasicObject` in 1.8.7. (Chris Griego, #739)
571
+ make the copies be null objects. (Myron Marston, rspec/rspec-mocks#732)
572
+ * Don't inadvertently define `BasicObject` in 1.8.7. (Chris Griego, rspec/rspec-mocks#739)
536
573
 
537
574
  ### 3.0.2 / 2014-06-19
538
575
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.1...v3.0.2)
@@ -540,11 +577,11 @@ Bug Fixes:
540
577
  Bug Fixes:
541
578
 
542
579
  * Fix edge case that triggered "can't add a new key into hash during
543
- iteration" during mock verification. (Sam Phippen, Myron Marston, #711)
580
+ iteration" during mock verification. (Sam Phippen, Myron Marston, rspec/rspec-mocks#711)
544
581
  * Fix verifying doubles so that when they accidentally leak into another
545
582
  example, they provide the same clear error message that normal doubles
546
- do. (Myron Marston, #718)
547
- * Make `ordered` work with exact receive counts. (Sam Phippen, #713)
583
+ do. (Myron Marston, rspec/rspec-mocks#718)
584
+ * Make `ordered` work with exact receive counts. (Sam Phippen, rspec/rspec-mocks#713)
548
585
 
549
586
  ### 3.0.1 / 2014-06-07
550
587
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0...v3.0.1)
@@ -552,10 +589,10 @@ Bug Fixes:
552
589
  Bug Fixes:
553
590
 
554
591
  * Fix `receive_message_chain(...)` so that it supports `with` just like
555
- `stub_chain` did. (Jon Rowe, #697)
592
+ `stub_chain` did. (Jon Rowe, rspec/rspec-mocks#697)
556
593
  * Fix regression in `expect_any_instance_of` so that it expects the
557
594
  message on _any_ instance rather than on _every_ instance.
558
- (Myron Marston, #699)
595
+ (Myron Marston, rspec/rspec-mocks#699)
559
596
 
560
597
  ### 3.0.0 / 2014-06-01
561
598
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0.rc1...v3.0.0)
@@ -768,14 +805,14 @@ Bug Fixes:
768
805
 
769
806
  Bug Fixes:
770
807
 
771
- * Add missing deprecation for using `with` with no arguments e.g. `with()`. (Yousuke, #970)
808
+ * Add missing deprecation for using `with` with no arguments e.g. `with()`. (Yousuke, rspec/rspec-mocks#970)
772
809
 
773
810
  ### 2.99.3 / 2015-01-09
774
811
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.2...v2.99.3)
775
812
 
776
813
  Bug Fixes:
777
814
 
778
- * Fix regression that caused an error when a test double was deserialized from YAML. (Yuji Nakayama, #777)
815
+ * Fix regression that caused an error when a test double was deserialized from YAML. (Yuji Nakayama, rspec/rspec-mocks#777)
779
816
 
780
817
  ### 2.99.2 / 2014-07-21
781
818
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.1...v2.99.2)
@@ -783,7 +820,7 @@ Bug Fixes:
783
820
  Enhancements:
784
821
 
785
822
  * Warn about upcoming change to `#===` matching and `DateTime#===` behaviour.
786
- (Jon Rowe, #735)
823
+ (Jon Rowe, rspec/rspec-mocks#735)
787
824
 
788
825
  ### 2.99.1 / 2014-06-12
789
826
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0...v2.99.1)
@@ -791,11 +828,11 @@ Enhancements:
791
828
  Bug Fixes:
792
829
 
793
830
  * Fix bug that caused errors at the end of each example
794
- when a `double.as_null_object` had been frozen. (Yuji Nakayama, #698)
831
+ when a `double.as_null_object` had been frozen. (Yuji Nakayama, rspec/rspec-mocks#698)
795
832
 
796
833
  Deprecations:
797
834
 
798
- * Deprecate freezing a test double. (Yuji Nakayama, #698)
835
+ * Deprecate freezing a test double. (Yuji Nakayama, rspec/rspec-mocks#698)
799
836
 
800
837
  ### 2.99.0 / 2014-06-01
801
838
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0.rc1...v2.99.0)
@@ -971,8 +1008,8 @@ Bug fixes
971
1008
  * Fix `Marshal.dump` extension so that it correctly handles nil.
972
1009
  (Luke Imhoff, Jon Rowe)
973
1010
  * Fix isolation of `allow_message_expectations_on_nil` (Jon Rowe)
974
- * Use inspect to format actual arguments on expectations in failure messages (#280, Ben Langfeld)
975
- * Protect against improperly initialised test doubles (#293) (Joseph Shraibman and Jon Rowe)
1011
+ * Use inspect to format actual arguments on expectations in failure messages (rspec/rspec-mocks#280, Ben Langfeld)
1012
+ * Protect against improperly initialised test doubles (rspec/rspec-mocks#293) (Joseph Shraibman and Jon Rowe)
976
1013
 
977
1014
  Deprecations
978
1015
 
@@ -1154,7 +1191,7 @@ Bug fixes
1154
1191
 
1155
1192
  * Allow a `as_null_object` to be passed to `with`
1156
1193
  * Pass proc to block passed to stub (Aubrey Rhodes)
1157
- * Initialize child message expectation args to match any args (#109 -
1194
+ * Initialize child message expectation args to match any args (rspec/rspec-mocks#109 -
1158
1195
  preethiramdev)
1159
1196
 
1160
1197
  ### 2.8.0 / 2012-01-04
@@ -259,10 +259,12 @@ module RSpec
259
259
  @observed_methods << method_name
260
260
  backup_method!(method_name)
261
261
  recorder = self
262
+ method_was_private = @klass.private_method_defined?(method_name)
262
263
  @klass.__send__(:define_method, method_name) do |*args, &blk|
263
264
  recorder.playback!(self, method_name)
264
265
  __send__(method_name, *args, &blk)
265
266
  end
267
+ @klass.__send__(:private, method_name) if method_was_private
266
268
  @klass.__send__(:ruby2_keywords, method_name) if @klass.respond_to?(:ruby2_keywords, true)
267
269
  end
268
270
 
@@ -68,7 +68,7 @@ module RSpec
68
68
  # counter.count # => 3
69
69
  # counter.count # => 3
70
70
  # # etc
71
- def and_return(first_value, *values)
71
+ def and_return(first_value, *values, &_block)
72
72
  raise_already_invoked_error_if_necessary(__method__)
73
73
  if negative?
74
74
  raise "`and_return` is not supported with negative message expectations"
@@ -106,7 +106,7 @@ module RSpec
106
106
  # api.get_foo # => :a_foo
107
107
  # api.get_foo # => :a_foo
108
108
  # # etc
109
- def and_invoke(first_proc, *procs)
109
+ def and_invoke(first_proc, *procs, &_block)
110
110
  raise_already_invoked_error_if_necessary(__method__)
111
111
  if negative?
112
112
  raise "`and_invoke` is not supported with negative message expectations"
@@ -400,6 +400,9 @@ module RSpec
400
400
  end
401
401
  alias inspect to_s
402
402
 
403
+ # Implementation details is a long module
404
+ # rubocop:disable Metrics/ModuleLength
405
+
403
406
  # @private
404
407
  # Contains the parts of `MessageExpectation` that aren't part of
405
408
  # rspec-mocks' public API. The class is very big and could really use
@@ -436,6 +439,8 @@ module RSpec
436
439
  @ordered = false
437
440
  @at_least = @at_most = @exactly = nil
438
441
 
442
+ self.invoking_internals = false
443
+
439
444
  # Initialized to nil so that we don't allocate an array for every
440
445
  # mock or stub. See also comment in `and_yield`.
441
446
  @args_to_yield = nil
@@ -471,10 +476,19 @@ module RSpec
471
476
  ruby2_keywords :safe_invoke if respond_to?(:ruby2_keywords, true)
472
477
 
473
478
  def invoke(parent_stub, *args, &block)
474
- invoke_incrementing_actual_calls_by(1, true, parent_stub, *args, &block)
479
+ if invoking_internals
480
+ safe_invoke_without_incrementing_received_count(parent_stub, *args, &block)
481
+ else
482
+ invoke_incrementing_actual_calls_by(1, true, parent_stub, *args, &block)
483
+ end
475
484
  end
476
485
  ruby2_keywords :invoke if respond_to?(:ruby2_keywords, true)
477
486
 
487
+ def safe_invoke_without_incrementing_received_count(parent_stub, *args, &block)
488
+ invoke_incrementing_actual_calls_by(0, false, parent_stub, *args, &block)
489
+ end
490
+ ruby2_keywords :safe_invoke_without_incrementing_received_count if respond_to?(:ruby2_keywords, true)
491
+
478
492
  def invoke_without_incrementing_received_count(parent_stub, *args, &block)
479
493
  invoke_incrementing_actual_calls_by(0, true, parent_stub, *args, &block)
480
494
  end
@@ -601,7 +615,24 @@ module RSpec
601
615
  @exception_source_id ||= "#{self.class.name} #{__id__}"
602
616
  end
603
617
 
618
+ def invoking_internals
619
+ RSpec::Support.thread_local_data[:"__rspec_#{object_id}_invoking_internals"]
620
+ end
621
+
622
+ def invoking_internals=(value)
623
+ # We clear the key for this rather than setting to false because otherwise the amount of
624
+ # thread local data will keep growing over the lifetime of the thread (which is a long
625
+ # time on a single threaded spec run e.g standard MRI)
626
+ if value
627
+ RSpec::Support.thread_local_data[:"__rspec_#{object_id}_invoking_internals"] = true
628
+ else
629
+ RSpec::Support.thread_local_data.delete(:"__rspec_#{object_id}_invoking_internals")
630
+ end
631
+ end
632
+
604
633
  def invoke_incrementing_actual_calls_by(increment, allowed_to_fail, parent_stub, *args, &block)
634
+ self.invoking_internals = true
635
+
605
636
  args.unshift(orig_object) if yield_receiver_to_implementation_block?
606
637
 
607
638
  if negative? || (allowed_to_fail && (@exactly || @at_most) && (@actual_received_count == @expected_received_count))
@@ -617,12 +648,15 @@ module RSpec
617
648
 
618
649
  @order_group.handle_order_constraint self
619
650
 
651
+ self.invoking_internals = false
652
+
620
653
  if implementation.present?
621
654
  implementation.call(*args, &block)
622
655
  elsif parent_stub
623
656
  parent_stub.invoke(nil, *args, &block)
624
657
  end
625
658
  ensure
659
+ self.invoking_internals = false
626
660
  @actual_received_count_write_mutex.synchronize do
627
661
  @actual_received_count += increment
628
662
  end
@@ -688,6 +722,7 @@ module RSpec
688
722
 
689
723
  include ImplementationDetails
690
724
  end
725
+ # rubocop:enable Metrics/ModuleLength
691
726
 
692
727
  # Handles the implementation of an `and_yield` declaration.
693
728
  # @private
@@ -748,6 +783,7 @@ module RSpec
748
783
 
749
784
  proc.call(*args, &block)
750
785
  end
786
+ ruby2_keywords(:call) if respond_to?(:ruby2_keywords, true)
751
787
  end
752
788
 
753
789
  # Represents a configured implementation. Takes into account
@@ -115,7 +115,7 @@ module RSpec
115
115
  Matchers::Receive.new(method_name, block)
116
116
  end
117
117
 
118
- def receive_messages(message_return_value_hash)
118
+ def receive_messages(message_return_value_hash, &_block)
119
119
  matcher = Matchers::ReceiveMessages.new(message_return_value_hash)
120
120
  matcher.warn_about_block if block_given?
121
121
  matcher
@@ -49,7 +49,9 @@ module RSpec
49
49
 
50
50
  # @private
51
51
  def respond_to?(message, incl_private=false)
52
- __mock_proxy.null_object? ? true : super
52
+ return true if __mock_proxy.null_object?
53
+
54
+ super
53
55
  end
54
56
 
55
57
  # @private
@@ -36,12 +36,14 @@ module RSpec
36
36
 
37
37
  # Redefining `__send__` causes ruby to issue a warning.
38
38
  old, $VERBOSE = $VERBOSE, nil
39
+ # rubocop:disable Naming/MethodName
39
40
  def __send__(name, *args, &block)
40
41
  @__sending_message = name
41
42
  super
42
43
  ensure
43
44
  @__sending_message = nil
44
45
  end
46
+ # rubocop:enable Naming/MethodName
45
47
  ruby2_keywords :__send__ if respond_to?(:ruby2_keywords, true)
46
48
  $VERBOSE = old
47
49
 
@@ -3,7 +3,7 @@ module RSpec
3
3
  # Version information for RSpec mocks.
4
4
  module Version
5
5
  # Version of RSpec mocks currently in use in SemVer format.
6
- STRING = '3.13.1'
6
+ STRING = '3.13.5'
7
7
  end
8
8
  end
9
9
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,22 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-mocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.1
4
+ version: 3.13.5
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-05-08 00:00:00.000000000 Z
46
+ date: 1980-01-02 00:00:00.000000000 Z
49
47
  dependencies:
50
48
  - !ruby/object:Gem::Dependency
51
49
  name: rspec-support
@@ -81,68 +79,6 @@ dependencies:
81
79
  - - "<"
82
80
  - !ruby/object:Gem::Version
83
81
  version: '2.0'
84
- - !ruby/object:Gem::Dependency
85
- name: rake
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">"
89
- - !ruby/object:Gem::Version
90
- version: 10.0.0
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">"
96
- - !ruby/object:Gem::Version
97
- version: 10.0.0
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: aruba
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - ">="
117
- - !ruby/object:Gem::Version
118
- version: 1.1.0
119
- - - "<"
120
- - !ruby/object:Gem::Version
121
- version: 3.0.0
122
- type: :development
123
- prerelease: false
124
- version_requirements: !ruby/object:Gem::Requirement
125
- requirements:
126
- - - ">="
127
- - !ruby/object:Gem::Version
128
- version: 1.1.0
129
- - - "<"
130
- - !ruby/object:Gem::Version
131
- version: 3.0.0
132
- - !ruby/object:Gem::Dependency
133
- name: minitest
134
- requirement: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '5.2'
139
- type: :development
140
- prerelease: false
141
- version_requirements: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '5.2'
146
82
  description: RSpec's 'test double' framework, with support for stubbing and mocking
147
83
  email: rspec@googlegroups.com
148
84
  executables: []
@@ -195,16 +131,16 @@ files:
195
131
  - lib/rspec/mocks/verifying_message_expectation.rb
196
132
  - lib/rspec/mocks/verifying_proxy.rb
197
133
  - lib/rspec/mocks/version.rb
198
- homepage: https://github.com/rspec/rspec-mocks
134
+ homepage: https://rspec.info
199
135
  licenses:
200
136
  - MIT
201
137
  metadata:
202
- bug_tracker_uri: https://github.com/rspec/rspec-mocks/issues
203
- changelog_uri: https://github.com/rspec/rspec-mocks/blob/v3.13.1/Changelog.md
138
+ bug_tracker_uri: https://github.com/rspec/rspec/issues
139
+ changelog_uri: https://github.com/rspec/rspec/blob/rspec-mocks-v3.13.5/rspec-mocks/Changelog.md
204
140
  documentation_uri: https://rspec.info/documentation/
205
141
  mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
206
- source_code_uri: https://github.com/rspec/rspec-mocks
207
- post_install_message:
142
+ rubygems_mfa_required: 'true'
143
+ source_code_uri: https://github.com/rspec/rspec/blob/rspec-mocks-v3.13.5/rspec-mocks
208
144
  rdoc_options:
209
145
  - "--charset=UTF-8"
210
146
  require_paths:
@@ -220,8 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
156
  - !ruby/object:Gem::Version
221
157
  version: '0'
222
158
  requirements: []
223
- rubygems_version: 3.1.6
224
- signing_key:
159
+ rubygems_version: 3.6.7
225
160
  specification_version: 4
226
- summary: rspec-mocks-3.13.1
161
+ summary: rspec-mocks-3.13.5
227
162
  test_files: []
metadata.gz.sig CHANGED
Binary file