rspec-mocks 3.13.2 → 3.13.8

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: 560dd3294f2da199bebf87e99715e41d9a5859b2a47408121fe449b8614008e1
4
- data.tar.gz: 0baffd51e9e653573998948c8057918b0e133caa13435026ad30a30848e15094
3
+ metadata.gz: b278e5b46f591add62ff285b128c57e72afd02e0cf76be56039f57062b08103f
4
+ data.tar.gz: efbc56184844f95466ed307aa686016defb1c0596323d6f3dd67c381e30b8533
5
5
  SHA512:
6
- metadata.gz: 3ec16d16de43a63521e1e89111df5b26b009e1dfa6738e802fb79c485a3894a4bdf60b63f08a5420c7a37934f367c93250f112d630f727a552c9ac86ece41b7a
7
- data.tar.gz: 7a8e8e5b56dd7e362b7109bce4137c4f77a95eb50d1904fef38c2ff5cb28d605398b653ba9801ca8eab28b6c894d8f787275132d34193f031d7d10c305791e95
6
+ metadata.gz: 9a1d4027984daedf2de696846f383a325b5f39ce76415de40cccc5a6284bf0d81e4201c880f83b1ceedd9a8444405972bba0815bf7c34a420854c4f4d241044f
7
+ data.tar.gz: 23561778a08ba4fd6e7a24669389bc41ed1b386cc554cedc0a3cbd253afcb7520ff658d3a1b7d8b9f8fe6a7b7cfe1e4f31a48c443fde20dbafe51d17afdd8ba6
checksums.yaml.gz.sig CHANGED
Binary file
data/Changelog.md CHANGED
@@ -1,12 +1,64 @@
1
1
  ### Development
2
- [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.13.2...3-13-maintennace)
2
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.8...3-13-maintenance)
3
+
4
+ ### 3.13.8 / 2026-02-27
5
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.7...rspec-mocks-v3.13.8)
6
+
7
+ Bug Fixes:
8
+
9
+ * Improve thread safety of mocks invocation recording. (Chad Wilson, #286)
10
+ * Expand `any_instance` warning about prepended methods to private/protected methods. (Alex Dean, #297)
11
+
12
+ ### 3.13.7 / 2025-10-31
13
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.6...rspec-mocks-v3.13.7)
14
+
15
+ Bug Fixes:
16
+
17
+ * Special case `to_h`, `to_hash` responses on null objects, prevents an issue with Rails. (Jon Rowe, rspec/rspec#275)
18
+
19
+ ### 3.13.6 / 2025-10-14
20
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.5...rspec-mocks-v3.13.6)
21
+
22
+ Bug Fixes:
23
+
24
+ * Work around possible infinite loop when stubbing `is_a?`. (Erin Paget, rspec/rspec#265)
25
+
26
+ ### 3.13.5 / 2025-05-27
27
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.4...rspec-mocks-v3.13.5)
28
+
29
+ Bug Fixes:
30
+
31
+ * Fix regression where a previous fix (rspec/rspec#214) would leave behind thread data
32
+ between tests. (Jon Rowe, rspec/rspec#219)
33
+ * Fix links in gemspec to point to monorepo / homepage. (Jon Rowe)
34
+
35
+ ### 3.13.4 / 2025-05-05
36
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.3...rspec-mocks-v3.13.4)
37
+
38
+ Bug Fixes:
39
+
40
+ * Fix regression where nested stubbed method calls would inadvertently not be counted.
41
+ (Jon Rowe, rspec/rspec#214)
42
+ * Fix regression where keyword arguments would not be passed through to nested stubbed
43
+ method calls. (Jon Rowe, rspec/rspec#214)
44
+
45
+ ### 3.13.3 / 2025-05-01
46
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.2...rspec-mocks-v3.13.3)
47
+
48
+ Bug Fixes:
49
+
50
+ * When stubbing methods using the `expect_any_instance_of` or `allow_any_instance_of`
51
+ ensure the stubbed method has the same visibility as the real method.
52
+ (Jon Rowe, rspec/rspec-mocks#1596)
53
+ * Prevent recursive calls to stubbed methods during stub invocation.
54
+ (James Dabbs, rspec/rspec#116, rspec/rspec#156)
3
55
 
4
56
  ### 3.13.2 / 2024-10-02
5
57
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.13.1...v3.13.2)
6
58
 
7
59
  Bug Fixes:
8
60
 
9
- * Support keyword arguments in callables passed to `and_invoke`. (Jon Rowe, #1595)
61
+ * Support keyword arguments in callables passed to `and_invoke`. (Jon Rowe, rspec/rspec-mocks#1595)
10
62
 
11
63
  ### 3.13.1 / 2024-05-08
12
64
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.13.0...v3.13.1)
@@ -14,21 +66,21 @@ Bug Fixes:
14
66
  Bug Fixes:
15
67
 
16
68
  * Use `RSpec::Support::Mutex` in `RSpec::Mocks::Proxy` to avoid issues from
17
- stubbing `::Mutex#new`. (Eric Mueller, #1575)
69
+ stubbing `::Mutex#new`. (Eric Mueller, rspec/rspec-mocks#1575)
18
70
 
19
71
  ### 3.13.0 / 2024-02-04
20
72
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.7...v3.13.0)
21
73
 
22
74
  Enhancements:
23
75
 
24
- * Add an `array_excluding` matcher for arguments. (Zane Wolfgang Pickett, #1528)
76
+ * Add an `array_excluding` matcher for arguments. (Zane Wolfgang Pickett, rspec/rspec-mocks#1528)
25
77
 
26
78
  ### 3.12.7 / 2024-02-04
27
79
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.6...v3.12.7)
28
80
 
29
81
  Bug Fixes:
30
82
 
31
- * Reduce allocations from "any_instance" style mocks. (Carlos Palhares, #1479)
83
+ * Reduce allocations from "any_instance" style mocks. (Carlos Palhares, rspec/rspec-mocks#1479)
32
84
 
33
85
  ### 3.12.6 / 2023-07-11
34
86
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.5...v3.12.6)
@@ -36,7 +88,7 @@ Bug Fixes:
36
88
  Bug Fixes:
37
89
 
38
90
  * Fix an issue with `and_call_original` when using the `method_missing` fallback
39
- with keyword arguments. (Igor Drozdov, #1552)
91
+ with keyword arguments. (Igor Drozdov, rspec/rspec-mocks#1552)
40
92
 
41
93
  ### 3.12.5 / 2023-03-30
42
94
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.4...v3.12.5)
@@ -44,16 +96,16 @@ Bug Fixes:
44
96
  Bug Fixes:
45
97
 
46
98
  * Fix compatibility issue with Rails where active_support monkey patches `with`
47
- when using any instance. (Lachlan Sylvester, #1540)
99
+ when using any instance. (Lachlan Sylvester, rspec/rspec-mocks#1540)
48
100
 
49
101
  ### 3.12.4 / 2023-03-12
50
102
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.3...v3.12.4)
51
103
 
52
104
  Bug Fixes:
53
105
 
54
- * Fix an issue with asserting that Array#reverse is never called. (Brad Trick, #1533)
106
+ * Fix an issue with asserting that Array#reverse is never called. (Brad Trick, rspec/rspec-mocks#1533)
55
107
  * Fix compatibility issue with Rails where active_support monkey patches `with`.
56
- (Jean Boussier, #1531, #1534)
108
+ (Jean Boussier, rspec/rspec-mocks#1531, rspec/rspec-mocks#1534)
57
109
 
58
110
  ### 3.12.3 / 2023-01-17
59
111
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.2...v3.12.3)
@@ -61,7 +113,7 @@ Bug Fixes:
61
113
  Bug Fixes:
62
114
 
63
115
  * Fix keyword delegation in `send` for verifying doubles on Ruby 3.
64
- (Charlie Honig, #1485)
116
+ (Charlie Honig, rspec/rspec-mocks#1485)
65
117
 
66
118
  ### 3.12.2 / 2023-01-07
67
119
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.1...v3.12.2)
@@ -69,24 +121,24 @@ Bug Fixes:
69
121
  Bug Fixes:
70
122
 
71
123
  * Fix implementation blocks for mocks using keyword arguments on Ruby 3.2.0.
72
- (Adam Steel, #1508)
124
+ (Adam Steel, rspec/rspec-mocks#1508)
73
125
  * Fix keyword argument assertions when mocking using `with` on Ruby 3.2.0.
74
- (Slava Kardakov, Benoit Tigeot, Phil Pirozhkov, Benoit Daloze, #1514)
126
+ (Slava Kardakov, Benoit Tigeot, Phil Pirozhkov, Benoit Daloze, rspec/rspec-mocks#1514)
75
127
 
76
128
  ### 3.12.1 / 2022-12-10
77
129
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.0...v3.12.1)
78
130
 
79
131
  Bug Fixes:
80
132
 
81
- * Remove empty diff marker when a diff only contains console codes. (Jon Rowe, #1506)
82
- * Show keyword vs hash diff marker when arguments are not `==` (Jon Rowe, #1506)
133
+ * Remove empty diff marker when a diff only contains console codes. (Jon Rowe, rspec/rspec-mocks#1506)
134
+ * Show keyword vs hash diff marker when arguments are not `==` (Jon Rowe, rspec/rspec-mocks#1506)
83
135
  * Change check to detect frozen objects to rescue errors rather than
84
136
  pre-empting by checking `frozen?` due to some objects mis-behaving.
85
- (Keegan Roth, #1401)
137
+ (Keegan Roth, rspec/rspec-mocks#1401)
86
138
  * Prevent unfulfilled expectations using `expect_any_instance_of` across a class
87
- inheritance boundary from raising rather than failing. (Jon Rowe, #1496)
139
+ inheritance boundary from raising rather than failing. (Jon Rowe, rspec/rspec-mocks#1496)
88
140
  * Prevent a misleading error message when using `allow(...).not_to` with
89
- unsupported matchers. (Phil Pirozhkov, #1503)
141
+ unsupported matchers. (Phil Pirozhkov, rspec/rspec-mocks#1503)
90
142
 
91
143
  ### 3.12.0 / 2022-10-26
92
144
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.2...v3.12.0)
@@ -94,7 +146,7 @@ Bug Fixes:
94
146
  Enhancements:
95
147
 
96
148
  * Improve diff output when diffing keyword arguments against hashes.
97
- (Jean Boussier, #1461)
149
+ (Jean Boussier, rspec/rspec-mocks#1461)
98
150
 
99
151
  ### 3.11.2 / 2022-10-25
100
152
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.1...v3.11.2)
@@ -103,9 +155,9 @@ Bug Fixes:
103
155
 
104
156
  * Use the original implementation of `Class.new` to detect overridden definitions
105
157
  of `new` rather than the owner, fixing detection of "double aliased" methods
106
- in Ruby 3 and above. (Benoit Daloze, #1470, #1476)
158
+ in Ruby 3 and above. (Benoit Daloze, rspec/rspec-mocks#1470, rspec/rspec-mocks#1476)
107
159
  * Support keyword argument semantics when constraining argument expectations using
108
- `with` on Ruby 3.0+ with `instance_double` (Andrii Malyshko, #1473)
160
+ `with` on Ruby 3.0+ with `instance_double` (Andrii Malyshko, rspec/rspec-mocks#1473)
109
161
 
110
162
  ### 3.11.1 / 2022-03-31
111
163
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.0...v3.11.1)
@@ -114,7 +166,7 @@ Bug Fixes:
114
166
 
115
167
  * Add extra `ruby2_keywords` calls to properly designate methods using
116
168
  `*args` to pass keyword around, fixes an issue with TruffleRuby.
117
- (Benoit Daloze, #1464)
169
+ (Benoit Daloze, rspec/rspec-mocks#1464)
118
170
 
119
171
  ### 3.11.0 / 2022-02-09
120
172
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.3...v3.11.0)
@@ -122,16 +174,16 @@ Bug Fixes:
122
174
  Enhancements:
123
175
 
124
176
  * Add `and_invoke` implementation for configuring responses to `receive`
125
- (and `receive_messages`) with multiple callable objects. (Kyle Smith, #1411)
177
+ (and `receive_messages`) with multiple callable objects. (Kyle Smith, rspec/rspec-mocks#1411)
126
178
 
127
179
  ### 3.10.3 / 2022-01-28
128
180
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.2...v3.10.3)
129
181
 
130
182
  Bug Fixes:
131
183
 
132
- * Suppress warning by setting `$VERBOSE` to nil. (Nobuyoshi Nakada, #1414)
184
+ * Suppress warning by setting `$VERBOSE` to nil. (Nobuyoshi Nakada, rspec/rspec-mocks#1414)
133
185
  * Support keyword argument semantics when constraining argument expectations using
134
- `with` on Ruby 3.0+ (Yusuke Endoh, #1394)
186
+ `with` on Ruby 3.0+ (Yusuke Endoh, rspec/rspec-mocks#1394)
135
187
 
136
188
  ### 3.10.2 / 2021-01-27
137
189
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.1...v3.10.2)
@@ -139,12 +191,12 @@ Bug Fixes:
139
191
  Bug Fixes:
140
192
 
141
193
  * Support keyword arguments with `and_call_original` on Ruby 3.0.
142
- (Bryan Powell, #1385)
194
+ (Bryan Powell, rspec/rspec-mocks#1385)
143
195
  * `RSpec::Mocks::Constant#previously_defined?` is now always a boolean.
144
- (Phil Pirozhkov, #1397)
196
+ (Phil Pirozhkov, rspec/rspec-mocks#1397)
145
197
  * Support keyword arguments on Ruby 3.0 when used with `expect_any_instance_of`
146
198
  or `allow_any_instance_of` with `and_call_original`.
147
- (Jess Hottenstein, #1407)
199
+ (Jess Hottenstein, rspec/rspec-mocks#1407)
148
200
 
149
201
  ### 3.10.1 / 2020-12-27
150
202
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.0...v3.10.1)
@@ -152,7 +204,7 @@ Bug Fixes:
152
204
  Bug Fixes:
153
205
 
154
206
  * Issue `ArgumentError` rather than `TypeError` when unsupported methods on
155
- unsupported objects are attempted to be stubbed. (@zhisme, #1357)
207
+ unsupported objects are attempted to be stubbed. (@zhisme, rspec/rspec-mocks#1357)
156
208
 
157
209
  ### 3.10.0 / 2020-10-30
158
210
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.9.1...v3.10.0)
@@ -160,9 +212,9 @@ Bug Fixes:
160
212
  Enhancements:
161
213
  * Add the ability to set a custom error generator in `MessageExpectation`.
162
214
  This will allow rspec-expectations to inject a custom failure message.
163
- (Benoit Tigeot and Nicolas Zermati, #1312)
215
+ (Benoit Tigeot and Nicolas Zermati, rspec/rspec-mocks#1312)
164
216
  * Return the result of the block passed to `RSpec::Mocks.with_temporary_scope`
165
- when block run. (@expeehaa, #1329)
217
+ when block run. (@expeehaa, rspec/rspec-mocks#1329)
166
218
 
167
219
  ### 3.9.1 / 2019-12-31
168
220
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.9.0...v3.9.1)
@@ -170,7 +222,7 @@ Enhancements:
170
222
  Bug Fixes:
171
223
 
172
224
  * Trigger `RSpec::Mocks.configuration.verifying_double_callbacks` when using
173
- `allow_any_instance_of` or `expect_any_instance_of` (Daniel Orner, #1309)
225
+ `allow_any_instance_of` or `expect_any_instance_of` (Daniel Orner, rspec/rspec-mocks#1309)
174
226
 
175
227
  ### 3.9.0 / 2019-10-07
176
228
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.8.2...v3.9.0)
@@ -178,16 +230,16 @@ Bug Fixes:
178
230
  Enhancements:
179
231
 
180
232
  * Improve thread safety of message expectations by using Mutex to prevent
181
- deadlocking errors. (Ry Biesemeyer, #1236)
233
+ deadlocking errors. (Ry Biesemeyer, rspec/rspec-mocks#1236)
182
234
  * Add the ability to use `time` as an alias for `times`. For example:
183
235
  `expect(Class).to receive(:method).exactly(1).time`.
184
- (Pistos, Benoit Tigeot, #1271)
236
+ (Pistos, Benoit Tigeot, rspec/rspec-mocks#1271)
185
237
 
186
238
  ### 3.8.2 / 2019-10-02
187
239
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.8.1...v3.8.2)
188
240
 
189
241
  * Allow `array_including` argument matchers to be nested.
190
- (Emmanuel Delmas, #1291)
242
+ (Emmanuel Delmas, rspec/rspec-mocks#1291)
191
243
 
192
244
  ### 3.8.1 / 2019-06-13
193
245
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.8.0...v3.8.1)
@@ -195,7 +247,7 @@ Enhancements:
195
247
  Bug Fixes:
196
248
 
197
249
  * Ensure stubbing methods does not change their visibility.
198
- (Kevin Boschert, #1277)
250
+ (Kevin Boschert, rspec/rspec-mocks#1277)
199
251
 
200
252
  ### 3.8.0 / 2018-08-04
201
253
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.7.0...v3.8.0)
@@ -203,12 +255,12 @@ Bug Fixes:
203
255
  Bug Fixes:
204
256
 
205
257
  * Issue error when encountering invalid "counted" negative message expectations.
206
- (Sergiy Yarinovskiy, #1212)
258
+ (Sergiy Yarinovskiy, rspec/rspec-mocks#1212)
207
259
  * Ensure `allow_any_instance_of` and `expect_any_instance_of` can be temporarily
208
- supressed. (Jon Rowe, #1228)
260
+ supressed. (Jon Rowe, rspec/rspec-mocks#1228)
209
261
  * Ensure `expect_any_instance_of(double).to_not have_received(:some_method)`
210
262
  fails gracefully (as its not supported) rather than issuing a `NoMethodError`.
211
- (Maxim Krizhanovsky, #1231)
263
+ (Maxim Krizhanovsky, rspec/rspec-mocks#1231)
212
264
 
213
265
  ### 3.7.0 / 2017-10-17
214
266
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.6.0...v3.7.0)
@@ -216,12 +268,12 @@ Bug Fixes:
216
268
  Enhancements:
217
269
 
218
270
  * Improve compatibility with `--enable-frozen-string-literal` option
219
- on Ruby 2.3+. (Pat Allan, #1165)
271
+ on Ruby 2.3+. (Pat Allan, rspec/rspec-mocks#1165)
220
272
 
221
273
  Bug Fixes:
222
274
 
223
275
  * Fix `hash_including` and `hash_excluding` so that they work against
224
- subclasses of `Hash`. (Aaron Rosenberg, #1167)
276
+ subclasses of `Hash`. (Aaron Rosenberg, rspec/rspec-mocks#1167)
225
277
 
226
278
  ### 3.6.0 / 2017-05-04
227
279
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.6.0.beta2...v3.6.0)
@@ -229,11 +281,11 @@ Bug Fixes:
229
281
  Bug Fixes:
230
282
 
231
283
  * Fix "instance variable @color not initialized" warning when using
232
- rspec-mocks without rspec-core. (Myron Marston, #1142)
284
+ rspec-mocks without rspec-core. (Myron Marston, rspec/rspec-mocks#1142)
233
285
  * Restore aliased module methods properly when stubbing on 1.8.7.
234
- (Samuel Giddins, #1144)
286
+ (Samuel Giddins, rspec/rspec-mocks#1144)
235
287
  * Allow a message chain expectation to be constrained by argument(s).
236
- (Jon Rowe, #1156)
288
+ (Jon Rowe, rspec/rspec-mocks#1156)
237
289
 
238
290
  ### 3.6.0.beta2 / 2016-12-12
239
291
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.6.0.beta1...v3.6.0.beta2)
@@ -242,16 +294,16 @@ Enhancements:
242
294
 
243
295
  * Add new `without_partial_double_verification { }` API that lets you
244
296
  temporarily turn off partial double verification for an example.
245
- (Jon Rowe, #1104)
297
+ (Jon Rowe, rspec/rspec-mocks#1104)
246
298
 
247
299
  ### 3.6.0.beta1 / 2016-10-09
248
300
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0...v3.6.0.beta1)
249
301
 
250
302
  Bug Fixes:
251
303
 
252
- * Return the test double instance form `#freeze` (Alessandro Berardi, #1109)
304
+ * Return the test double instance form `#freeze` (Alessandro Berardi, rspec/rspec-mocks#1109)
253
305
  * Allow the special logic for stubbing `new` to work when `<Class>.method` has
254
- been redefined. (Proby, #1119)
306
+ been redefined. (Proby, rspec/rspec-mocks#1119)
255
307
 
256
308
  ### 3.5.0 / 2016-07-01
257
309
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta4...v3.5.0)
@@ -259,14 +311,14 @@ Bug Fixes:
259
311
  Enhancements:
260
312
 
261
313
  * Provides a nice string representation of
262
- `RSpec::Mocks::MessageExpectation` (Myron Marston, #1095)
314
+ `RSpec::Mocks::MessageExpectation` (Myron Marston, rspec/rspec-mocks#1095)
263
315
 
264
316
  ### 3.5.0.beta4 / 2016-06-05
265
317
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta3...v3.5.0.beta4)
266
318
 
267
319
  Enhancements:
268
320
 
269
- * Add `and_throw` to any instance handling. (Tobias Bühlmann, #1068)
321
+ * Add `and_throw` to any instance handling. (Tobias Bühlmann, rspec/rspec-mocks#1068)
270
322
 
271
323
  ### 3.5.0.beta3 / 2016-04-02
272
324
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta2...v3.5.0.beta3)
@@ -274,9 +326,9 @@ Enhancements:
274
326
  Enhancements:
275
327
 
276
328
  * Issue warning when attempting to use unsupported
277
- `allow(...).to receive(...).ordered`. (Jon Rowe, #1000)
329
+ `allow(...).to receive(...).ordered`. (Jon Rowe, rspec/rspec-mocks#1000)
278
330
  * Add `rspec/mocks/minitest_integration`, to properly integrate rspec-mocks
279
- with minitest. (Myron Marston, #1065)
331
+ with minitest. (Myron Marston, rspec/rspec-mocks#1065)
280
332
 
281
333
  ### 3.5.0.beta2 / 2016-03-10
282
334
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta1...v3.5.0.beta2)
@@ -284,12 +336,12 @@ Enhancements:
284
336
  Enhancements:
285
337
 
286
338
  * Improve error message displayed when using `and_wrap_original` on pure test
287
- doubles. (betesh, #1063)
339
+ doubles. (betesh, rspec/rspec-mocks#1063)
288
340
 
289
341
  Bug Fixes:
290
342
 
291
343
  * Fix issue that prevented `receive_message_chain(...).with(...)` working
292
- correctly on "any instance" mocks. (Jon Rowe, #1061)
344
+ correctly on "any instance" mocks. (Jon Rowe, rspec/rspec-mocks#1061)
293
345
 
294
346
  ### 3.5.0.beta1 / 2016-02-06
295
347
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.4.1...v3.5.0.beta1)
@@ -297,20 +349,20 @@ Bug Fixes:
297
349
  Bug Fixes:
298
350
 
299
351
  * Allow `any_instance_of(...).to receive(...)` to use `and_yield` multiple
300
- times. (Kilian Cirera Sant, #1054)
352
+ times. (Kilian Cirera Sant, rspec/rspec-mocks#1054)
301
353
  * Allow matchers which inherit from `rspec-mocks` matchers to be used for
302
- `allow`. (Andrew Kozin, #1056)
354
+ `allow`. (Andrew Kozin, rspec/rspec-mocks#1056)
303
355
  * Prevent stubbing `respond_to?` on partial doubles from causing infinite
304
- recursion. (Jon Rowe, #1013)
356
+ recursion. (Jon Rowe, rspec/rspec-mocks#1013)
305
357
  * Prevent aliased methods from disapearing after being mocked with
306
- `any_instance` (regression from #1043). (Joe Rafaniello, #1060)
358
+ `any_instance` (regression from rspec/rspec-mocks#1043). (Joe Rafaniello, rspec/rspec-mocks#1060)
307
359
 
308
360
  ### 3.4.1 / 2016-01-10
309
361
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.4.0...v3.4.1)
310
362
 
311
363
  Bug Fixes:
312
364
 
313
- * Fix `any_instance` to work properly on Ruby 2.3. (Joe Rafaniello, #1043)
365
+ * Fix `any_instance` to work properly on Ruby 2.3. (Joe Rafaniello, rspec/rspec-mocks#1043)
314
366
 
315
367
  ### 3.4.0 / 2015-11-11
316
368
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.2...v3.4.0)
@@ -318,18 +370,18 @@ Bug Fixes:
318
370
  Enhancements:
319
371
 
320
372
  * Make `expect(...).to have_received` work without relying upon
321
- rspec-expectations. (Myron Marston, #978)
373
+ rspec-expectations. (Myron Marston, rspec/rspec-mocks#978)
322
374
  * Add option for failing tests when expectations are set on `nil`.
323
- (Liz Rush, #983)
375
+ (Liz Rush, rspec/rspec-mocks#983)
324
376
 
325
377
  Bug Fixes:
326
378
 
327
379
  * Fix `have_received { ... }` so that any block passed when the message
328
- was received is forwarded to the `have_received` block. (Myron Marston, #1006)
380
+ was received is forwarded to the `have_received` block. (Myron Marston, rspec/rspec-mocks#1006)
329
381
  * Fix infinite loop in error generator when stubbing `respond_to?`.
330
- (Alex Dowad, #1022)
382
+ (Alex Dowad, rspec/rspec-mocks#1022)
331
383
  * Fix issue with using `receive` on subclasses (at a class level) with 1.8.7.
332
- (Alex Dowad, #1026)
384
+ (Alex Dowad, rspec/rspec-mocks#1026)
333
385
 
334
386
  ### 3.3.2 / 2015-07-15
335
387
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.1...v3.3.2)
@@ -337,7 +389,7 @@ Bug Fixes:
337
389
  Bug Fixes:
338
390
 
339
391
  * Prevent thread deadlock errors during proxy creation (e.g. when using
340
- `before_verifying_doubles` callbacks). (Jon Rowe, #980, #979)
392
+ `before_verifying_doubles` callbacks). (Jon Rowe, rspec/rspec-mocks#980, rspec/rspec-mocks#979)
341
393
 
342
394
  ### 3.3.1 / 2015-06-19
343
395
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.0...v3.3.1)
@@ -347,7 +399,7 @@ Bug Fixes:
347
399
  * Fix bug in `before_verifying_double` callback logic that caused it to be called
348
400
  once for each class in the ancestor list when mocking or stubbing a class. Now
349
401
  it is only called for the mocked or stubbed class, as you would expect. (Sam
350
- Phippen, #974)
402
+ Phippen, rspec/rspec-mocks#974)
351
403
 
352
404
  ### 3.3.0 / 2015-06-12
353
405
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.2.1...v3.3.0)
@@ -356,45 +408,45 @@ Enhancements:
356
408
 
357
409
  * When stubbing `new` on `MyClass` or `class_double(MyClass)`, use the
358
410
  method signature from `MyClass#initialize` to verify arguments.
359
- (Myron Marston, #886)
411
+ (Myron Marston, rspec/rspec-mocks#886)
360
412
  * Use matcher descriptions when generating description of received arguments
361
- for mock expectation failures. (Tim Wade, #891)
362
- * Avoid loading `stringio` unnecessarily. (Myron Marston, #894)
413
+ for mock expectation failures. (Tim Wade, rspec/rspec-mocks#891)
414
+ * Avoid loading `stringio` unnecessarily. (Myron Marston, rspec/rspec-mocks#894)
363
415
  * Verifying doubles failure messages now distinguish between class and instance
364
- level methods. (Tim Wade, #896, #908)
416
+ level methods. (Tim Wade, rspec/rspec-mocks#896, rspec/rspec-mocks#908)
365
417
  * Improve mock expectation failure messages so that it combines both
366
- number of times and the received arguments in the output. (John Ceh, #918)
418
+ number of times and the received arguments in the output. (John Ceh, rspec/rspec-mocks#918)
367
419
  * Improve how test doubles are represented in failure messages.
368
- (Siva Gollapalli, Myron Marston, #932)
420
+ (Siva Gollapalli, Myron Marston, rspec/rspec-mocks#932)
369
421
  * Rename `RSpec::Mocks::Configuration#when_declaring_verifying_double` to
370
422
  `RSpec::Mocks::Configuration#before_verifying_doubles` and utilise when
371
- verifying partial doubles. (Jon Rowe, #940)
423
+ verifying partial doubles. (Jon Rowe, rspec/rspec-mocks#940)
372
424
  * Use rspec-support's `ObjectFormatter` for improved formatting of
373
425
  arguments in failure messages so that, for example, full time
374
- precisions is displayed for time objects. (Gavin Miller, Myron Marston, #955)
426
+ precisions is displayed for time objects. (Gavin Miller, Myron Marston, rspec/rspec-mocks#955)
375
427
 
376
428
  Bug Fixes:
377
429
 
378
430
  * Ensure expectations that raise eagerly also raise during RSpec verification.
379
431
  This means that if exceptions are caught inside test execution the test will
380
- still fail. (Sam Phippen, #884)
432
+ still fail. (Sam Phippen, rspec/rspec-mocks#884)
381
433
  * Fix `have_received(msg).with(args).exactly(n).times` and
382
434
  `receive(msg).with(args).exactly(n).times` failure messages
383
435
  for when the message was received the wrong number of times with
384
436
  the specified args, and also received additional times with other
385
437
  arguments. Previously it confusingly listed the arguments as being
386
438
  mis-matched (even when the double was allowed to receive with any
387
- args) rather than listing the count. (John Ceh, #918)
439
+ args) rather than listing the count. (John Ceh, rspec/rspec-mocks#918)
388
440
  * Fix `any_args`/`anything` support so that we avoid calling `obj == anything`
389
441
  on user objects that may have improperly implemented `==` in a way that
390
- raises errors. (Myron Marston, #924)
442
+ raises errors. (Myron Marston, rspec/rspec-mocks#924)
391
443
  * Fix edge case involving stubbing the same method on a class and a subclass
392
- which previously hit a `NoMethodError` internally in RSpec. (Myron Marston #954)
444
+ which previously hit a `NoMethodError` internally in RSpec. (Myron Marston rspec/rspec-mocks#954)
393
445
  * Fix edge case where the message received count would be incremented multiple
394
- times for one failure. (Myron Marston, #957)
446
+ times for one failure. (Myron Marston, rspec/rspec-mocks#957)
395
447
  * Fix failure messages for when spies received the expected message with
396
- different arguments and also received another message. (Maurício Linhares, #960)
397
- * Silence whitespace-only diffs. (Myron Marston, #969)
448
+ different arguments and also received another message. (Maurício Linhares, rspec/rspec-mocks#960)
449
+ * Silence whitespace-only diffs. (Myron Marston, rspec/rspec-mocks#969)
398
450
 
399
451
  ### 3.2.1 / 2015-02-23
400
452
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.2.0...v3.2.1)
@@ -403,11 +455,11 @@ Bug Fixes:
403
455
 
404
456
  * Add missing `rspec/support/differ` require so that rspec-mocks can be
405
457
  used w/o rspec-expectations (which also loads the differ and hided the
406
- fact we forgot to require it). (Myron Marston, #893)
458
+ fact we forgot to require it). (Myron Marston, rspec/rspec-mocks#893)
407
459
  * Revert tracking of received arg mutation (added in 3.2.0 to provide an
408
460
  error in a situation we can't support) as our implementation has side
409
461
  effects on non-standard objects and there's no solution we could come
410
- up with that always works. (Myron Marston, #900)
462
+ up with that always works. (Myron Marston, rspec/rspec-mocks#900)
411
463
 
412
464
  ### 3.2.0 / 2015-02-03
413
465
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.3...v3.2.0)
@@ -415,55 +467,55 @@ Bug Fixes:
415
467
  Enhancements:
416
468
 
417
469
  * Treat `any_args` as an arg splat, allowing it to match an arbitrary
418
- number of args at any point in an arg list. (Myron Marston, #786)
470
+ number of args at any point in an arg list. (Myron Marston, rspec/rspec-mocks#786)
419
471
  * Print diffs when arguments in mock expectations are mismatched.
420
- (Sam Phippen, #751)
472
+ (Sam Phippen, rspec/rspec-mocks#751)
421
473
  * Support names for verified doubles (`instance_double`, `instance_spy`,
422
474
  `class_double`, `class_spy`, `object_double`, `object_spy`). (Cezary
423
- Baginski, #826)
475
+ Baginski, rspec/rspec-mocks#826)
424
476
  * Make `array_including` and `hash_including` argument matchers composable.
425
- (Sam Phippen, #819)
477
+ (Sam Phippen, rspec/rspec-mocks#819)
426
478
  * Make `allow_any_instance_of(...).to receive(...).and_wrap_original`
427
- work. (Ryan Fitzgerald, #869)
479
+ work. (Ryan Fitzgerald, rspec/rspec-mocks#869)
428
480
 
429
481
  Bug Fixes:
430
482
 
431
483
  * Provide a clear error when users wrongly combine `no_args` with
432
484
  additional arguments (e.g. `expect().to receive().with(no_args, 1)`).
433
- (Myron Marston, #786)
485
+ (Myron Marston, rspec/rspec-mocks#786)
434
486
  * Provide a clear error when users wrongly use `any_args` multiple times in the
435
487
  same argument list (e.g. `expect().to receive().with(any_args, 1, any_args)`.
436
- (Myron Marston, #786)
488
+ (Myron Marston, rspec/rspec-mocks#786)
437
489
  * Prevent the error generator from using user object #description methods.
438
- See [#685](https://github.com/rspec/rspec-mocks/issues/685).
439
- (Sam Phippen, #751)
490
+ See [rspec/rspec-mocks#685](https://github.com/rspec/rspec-mocks/issues/685).
491
+ (Sam Phippen, rspec/rspec-mocks#751)
440
492
  * Make verified doubles declared as `(instance|class)_double(SomeConst)`
441
493
  work properly when `SomeConst` has previously been stubbed.
442
494
  `(instance|class)_double("SomeClass")` already worked properly.
443
- (Myron Marston, #824)
495
+ (Myron Marston, rspec/rspec-mocks#824)
444
496
  * Add a matcher description for `receive`, `receive_messages` and
445
- `receive_message_chain`. (Myron Marston, #828)
497
+ `receive_message_chain`. (Myron Marston, rspec/rspec-mocks#828)
446
498
  * Validate invocation args for null object verified doubles.
447
- (Myron Marston, #829)
499
+ (Myron Marston, rspec/rspec-mocks#829)
448
500
  * Fix `RSpec::Mocks::Constant.original` when called with an invalid
449
501
  constant to return an object indicating the constant name is invalid,
450
- rather than blowing up. (Myron Marston, #833)
502
+ rather than blowing up. (Myron Marston, rspec/rspec-mocks#833)
451
503
  * Make `extend RSpec::Mocks::ExampleMethods` on any object work properly
452
504
  to add the rspec-mocks API to that object. Previously, `expect` would
453
- be undefined. (Myron Marston, #846)
505
+ be undefined. (Myron Marston, rspec/rspec-mocks#846)
454
506
  * Fix `require 'rspec/mocks/standalone'` so that it only affects `main`
455
507
  and not every object. It's really only intended to be used in a REPL
456
508
  like IRB, but some gems have loaded it, thinking it needs to be loaded
457
509
  when using rspec-mocks outside the context of rspec-core.
458
- (Myron Marston, #846)
510
+ (Myron Marston, rspec/rspec-mocks#846)
459
511
  * Prevent message expectations from being modified by customization methods
460
- (e.g. `with`) after they have been invoked. (Sam Phippen and Melanie Gilman, #837)
512
+ (e.g. `with`) after they have been invoked. (Sam Phippen and Melanie Gilman, rspec/rspec-mocks#837)
461
513
  * Handle cases where a method stub cannot be removed due to something
462
514
  external to RSpec monkeying with the method definition. This can
463
515
  happen, for example, when you `file.reopen(io)` after previously
464
- stubbing a method on the `file` object. (Myron Marston, #853)
516
+ stubbing a method on the `file` object. (Myron Marston, rspec/rspec-mocks#853)
465
517
  * Provide a clear error when received message args are mutated before
466
- a `have_received(...).with(...)` expectation. (Myron Marston, #868)
518
+ a `have_received(...).with(...)` expectation. (Myron Marston, rspec/rspec-mocks#868)
467
519
 
468
520
  ### 3.1.3 / 2014-10-08
469
521
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.2...v3.1.3)
@@ -471,13 +523,13 @@ Bug Fixes:
471
523
  Bug Fixes:
472
524
 
473
525
  * Correct received messages count when used with `have_received` matcher.
474
- (Jon Rowe, #793)
526
+ (Jon Rowe, rspec/rspec-mocks#793)
475
527
  * Provide a clear error message when you use `allow_any_instance_of(...)` or
476
528
  `expect_any_instance_of(...)` with the `have_received` matcher (they are
477
529
  not intended to be used together and previously caused an odd internal
478
- failure in rspec-mocks). (Jon Rowe, #799).
530
+ failure in rspec-mocks). (Jon Rowe, rspec/rspec-mocks#799).
479
531
  * Fix verified double `with` verification so that it applies to method
480
- stubs. (Myron Marston, #790)
532
+ stubs. (Myron Marston, rspec/rspec-mocks#790)
481
533
 
482
534
  ### 3.1.2 / 2014-09-26
483
535
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.1...v3.1.2)
@@ -486,7 +538,7 @@ Bug Fixes:
486
538
 
487
539
  * Provide a clear error message when you use `allow(...)` with the
488
540
  `have_received` matcher (they are not intended to be used together
489
- and previously caused an odd internal failure in rspec-mocks). (Jon Rowe, #788).
541
+ and previously caused an odd internal failure in rspec-mocks). (Jon Rowe, rspec/rspec-mocks#788).
490
542
 
491
543
  ### 3.1.1 / 2014-09-18
492
544
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.0...v3.1.1)
@@ -494,7 +546,7 @@ Bug Fixes:
494
546
  Bug Fixes:
495
547
 
496
548
  * Prevent included modules being detected as prepended modules on Ruby 2.0
497
- when using `any_instance_of(...)`. (Tony Novak, #781)
549
+ when using `any_instance_of(...)`. (Tony Novak, rspec/rspec-mocks#781)
498
550
 
499
551
  ### 3.1.0 / 2014-09-04
500
552
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.4...v3.1.0)
@@ -503,24 +555,24 @@ Enhancements:
503
555
 
504
556
  * Add spying methods (`spy`, `ìnstance_spy`, `class_spy` and `object_spy`)
505
557
  which create doubles as null objects for use with spying in testing. (Sam
506
- Phippen, #671)
558
+ Phippen, rspec/rspec-mocks#671)
507
559
  * `have_received` matcher will raise "does not implement" errors correctly when
508
- used with verifying doubles and partial doubles. (Xavier Shay, #722)
560
+ used with verifying doubles and partial doubles. (Xavier Shay, rspec/rspec-mocks#722)
509
561
  * Allow matchers to be used in place of keyword arguments in `with`
510
- expectations. (Xavier Shay, #726)
562
+ expectations. (Xavier Shay, rspec/rspec-mocks#726)
511
563
  * Add `thrice` modifier to message expectation interface as a synonym
512
- for `exactly(3).times`. (Dennis Taylor, #753)
564
+ for `exactly(3).times`. (Dennis Taylor, rspec/rspec-mocks#753)
513
565
  * Add more `thrice` synonyms e.g. `.at_least(:thrice)`, `.at_most(:thrice)`,
514
- `receive(...).thrice` and `have_received(...).thrice`. (Jon Rowe, #754)
566
+ `receive(...).thrice` and `have_received(...).thrice`. (Jon Rowe, rspec/rspec-mocks#754)
515
567
  * Add `and_wrap_original` modifier for partial doubles to mutate the
516
- response from a method. (Jon Rowe, #762)
568
+ response from a method. (Jon Rowe, rspec/rspec-mocks#762)
517
569
 
518
570
  Bug Fixes:
519
571
 
520
572
  * Remove `any_number_of_times` from `any_instance` recorders that were
521
- erroneously causing mention of the method in documentation. (Jon Rowe, #760)
573
+ erroneously causing mention of the method in documentation. (Jon Rowe, rspec/rspec-mocks#760)
522
574
  * Prevent included modules being detected as prepended modules on Ruby 2.0.
523
- (Eugene Kenny, #771)
575
+ (Eugene Kenny, rspec/rspec-mocks#771)
524
576
 
525
577
  ### 3.0.4 / 2014-08-14
526
578
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.3...v3.0.4)
@@ -528,7 +580,7 @@ Bug Fixes:
528
580
  Bug Fixes:
529
581
 
530
582
  * Restore `kind_of(x)` to match using `arg.kind_of?(x)` (like RSpec 2)
531
- rather than `x === arg`. (Jon Rowe, #750)
583
+ rather than `x === arg`. (Jon Rowe, rspec/rspec-mocks#750)
532
584
 
533
585
  ### 3.0.3 / 2014-07-21
534
586
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.2...v3.0.3)
@@ -536,10 +588,10 @@ Bug Fixes:
536
588
  Bug Fixes:
537
589
 
538
590
  * `have_received` matcher will raise "does not implement" errors correctly when
539
- used with verifying doubles and partial doubles. (Xavier Shay, #722)
591
+ used with verifying doubles and partial doubles. (Xavier Shay, rspec/rspec-mocks#722)
540
592
  * Make `double.as_null_object.dup` and `double.as_null_object.clone`
541
- make the copies be null objects. (Myron Marston, #732)
542
- * Don't inadvertently define `BasicObject` in 1.8.7. (Chris Griego, #739)
593
+ make the copies be null objects. (Myron Marston, rspec/rspec-mocks#732)
594
+ * Don't inadvertently define `BasicObject` in 1.8.7. (Chris Griego, rspec/rspec-mocks#739)
543
595
 
544
596
  ### 3.0.2 / 2014-06-19
545
597
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.1...v3.0.2)
@@ -547,11 +599,11 @@ Bug Fixes:
547
599
  Bug Fixes:
548
600
 
549
601
  * Fix edge case that triggered "can't add a new key into hash during
550
- iteration" during mock verification. (Sam Phippen, Myron Marston, #711)
602
+ iteration" during mock verification. (Sam Phippen, Myron Marston, rspec/rspec-mocks#711)
551
603
  * Fix verifying doubles so that when they accidentally leak into another
552
604
  example, they provide the same clear error message that normal doubles
553
- do. (Myron Marston, #718)
554
- * Make `ordered` work with exact receive counts. (Sam Phippen, #713)
605
+ do. (Myron Marston, rspec/rspec-mocks#718)
606
+ * Make `ordered` work with exact receive counts. (Sam Phippen, rspec/rspec-mocks#713)
555
607
 
556
608
  ### 3.0.1 / 2014-06-07
557
609
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0...v3.0.1)
@@ -559,10 +611,10 @@ Bug Fixes:
559
611
  Bug Fixes:
560
612
 
561
613
  * Fix `receive_message_chain(...)` so that it supports `with` just like
562
- `stub_chain` did. (Jon Rowe, #697)
614
+ `stub_chain` did. (Jon Rowe, rspec/rspec-mocks#697)
563
615
  * Fix regression in `expect_any_instance_of` so that it expects the
564
616
  message on _any_ instance rather than on _every_ instance.
565
- (Myron Marston, #699)
617
+ (Myron Marston, rspec/rspec-mocks#699)
566
618
 
567
619
  ### 3.0.0 / 2014-06-01
568
620
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0.rc1...v3.0.0)
@@ -775,14 +827,14 @@ Bug Fixes:
775
827
 
776
828
  Bug Fixes:
777
829
 
778
- * Add missing deprecation for using `with` with no arguments e.g. `with()`. (Yousuke, #970)
830
+ * Add missing deprecation for using `with` with no arguments e.g. `with()`. (Yousuke, rspec/rspec-mocks#970)
779
831
 
780
832
  ### 2.99.3 / 2015-01-09
781
833
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.2...v2.99.3)
782
834
 
783
835
  Bug Fixes:
784
836
 
785
- * Fix regression that caused an error when a test double was deserialized from YAML. (Yuji Nakayama, #777)
837
+ * Fix regression that caused an error when a test double was deserialized from YAML. (Yuji Nakayama, rspec/rspec-mocks#777)
786
838
 
787
839
  ### 2.99.2 / 2014-07-21
788
840
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.1...v2.99.2)
@@ -790,7 +842,7 @@ Bug Fixes:
790
842
  Enhancements:
791
843
 
792
844
  * Warn about upcoming change to `#===` matching and `DateTime#===` behaviour.
793
- (Jon Rowe, #735)
845
+ (Jon Rowe, rspec/rspec-mocks#735)
794
846
 
795
847
  ### 2.99.1 / 2014-06-12
796
848
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0...v2.99.1)
@@ -798,11 +850,11 @@ Enhancements:
798
850
  Bug Fixes:
799
851
 
800
852
  * Fix bug that caused errors at the end of each example
801
- when a `double.as_null_object` had been frozen. (Yuji Nakayama, #698)
853
+ when a `double.as_null_object` had been frozen. (Yuji Nakayama, rspec/rspec-mocks#698)
802
854
 
803
855
  Deprecations:
804
856
 
805
- * Deprecate freezing a test double. (Yuji Nakayama, #698)
857
+ * Deprecate freezing a test double. (Yuji Nakayama, rspec/rspec-mocks#698)
806
858
 
807
859
  ### 2.99.0 / 2014-06-01
808
860
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0.rc1...v2.99.0)
@@ -978,8 +1030,8 @@ Bug fixes
978
1030
  * Fix `Marshal.dump` extension so that it correctly handles nil.
979
1031
  (Luke Imhoff, Jon Rowe)
980
1032
  * Fix isolation of `allow_message_expectations_on_nil` (Jon Rowe)
981
- * Use inspect to format actual arguments on expectations in failure messages (#280, Ben Langfeld)
982
- * Protect against improperly initialised test doubles (#293) (Joseph Shraibman and Jon Rowe)
1033
+ * Use inspect to format actual arguments on expectations in failure messages (rspec/rspec-mocks#280, Ben Langfeld)
1034
+ * Protect against improperly initialised test doubles (rspec/rspec-mocks#293) (Joseph Shraibman and Jon Rowe)
983
1035
 
984
1036
  Deprecations
985
1037
 
@@ -1161,7 +1213,7 @@ Bug fixes
1161
1213
 
1162
1214
  * Allow a `as_null_object` to be passed to `with`
1163
1215
  * Pass proc to block passed to stub (Aubrey Rhodes)
1164
- * Initialize child message expectation args to match any args (#109 -
1216
+ * Initialize child message expectation args to match any args (rspec/rspec-mocks#109 -
1165
1217
  preethiramdev)
1166
1218
 
1167
1219
  ### 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
 
@@ -281,7 +283,9 @@ module RSpec
281
283
  if Support::RubyFeatures.module_prepends_supported?
282
284
  def allow_no_prepended_module_definition_of(method_name)
283
285
  prepended_modules = RSpec::Mocks::Proxy.prepended_modules_of(@klass)
284
- problem_mod = prepended_modules.find { |mod| mod.method_defined?(method_name) }
286
+ problem_mod = prepended_modules.find do |mod|
287
+ MethodReference.method_defined_at_any_visibility?(mod, method_name)
288
+ end
285
289
  return unless problem_mod
286
290
 
287
291
  AnyInstance.error_generator.raise_not_supported_with_prepend_error(method_name, problem_mod)
@@ -370,7 +370,7 @@ module RSpec
370
370
  end
371
371
 
372
372
  def times(count)
373
- "#{count} time#{count == 1 ? '' : 's'}"
373
+ "#{count} time#{'s' unless count == 1}"
374
374
  end
375
375
 
376
376
  def grouped_args(args)
@@ -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
@@ -1,3 +1,5 @@
1
+ RSpec::Support.require_rspec_support 'reentrant_mutex'
2
+
1
3
  module RSpec
2
4
  module Mocks
3
5
  # @private
@@ -5,6 +7,7 @@ module RSpec
5
7
  def initialize
6
8
  @expectations = []
7
9
  @invocation_order = []
10
+ @invocation_order_mutex = Support::Mutex.new
8
11
  @index = 0
9
12
  end
10
13
 
@@ -14,7 +17,9 @@ module RSpec
14
17
  end
15
18
 
16
19
  def invoked(message)
17
- @invocation_order << message
20
+ @invocation_order_mutex.synchronize do
21
+ @invocation_order << message
22
+ end
18
23
  end
19
24
 
20
25
  # @private
@@ -47,7 +52,9 @@ module RSpec
47
52
 
48
53
  def clear
49
54
  @index = 0
50
- @invocation_order.clear
55
+ @invocation_order_mutex.synchronize do
56
+ @invocation_order.clear
57
+ end
51
58
  @expectations.clear
52
59
  end
53
60
 
@@ -66,11 +73,15 @@ module RSpec
66
73
  end
67
74
 
68
75
  def invoked_expectations
69
- @expectations.select { |e| e.ordered? && @invocation_order.include?(e) }
76
+ @invocation_order_mutex.synchronize do
77
+ @expectations.select { |e| e.ordered? && @invocation_order.include?(e) }
78
+ end
70
79
  end
71
80
 
72
81
  def expected_invocations
73
- @invocation_order.map { |invocation| expectation_for(invocation) }.compact
82
+ @invocation_order_mutex.synchronize do
83
+ @invocation_order.map { |invocation| expectation_for(invocation) }.compact
84
+ end
74
85
  end
75
86
 
76
87
  def expectation_for(message)
@@ -32,7 +32,7 @@ module RSpec
32
32
 
33
33
  # @private
34
34
  def ensure_can_be_proxied!(object)
35
- return unless object.is_a?(Symbol)
35
+ return unless Symbol === object
36
36
 
37
37
  msg = "Cannot proxy frozen objects. Symbols such as #{object} cannot be mocked or stubbed."
38
38
  raise ArgumentError, msg
@@ -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
@@ -77,9 +79,10 @@ module RSpec
77
79
 
78
80
  if proxy.null_object?
79
81
  case message
80
- when :to_int then return 0
81
- when :to_a, :to_ary then return nil
82
- when :to_str then return to_s
82
+ when :to_int then return 0
83
+ when :to_a, :to_ary then return nil
84
+ when :to_h, :to_hash then return {}
85
+ when :to_str then return to_s
83
86
  else return self
84
87
  end
85
88
  end
@@ -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.2'
6
+ STRING = '3.13.8'
7
7
  end
8
8
  end
9
9
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-mocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.2
4
+ version: 3.13.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Baker
@@ -11,11 +11,11 @@ bindir: bin
11
11
  cert_chain:
12
12
  - |
13
13
  -----BEGIN CERTIFICATE-----
14
- MIIF1TCCA72gAwIBAgIJAPXjfUbCjdXUMA0GCSqGSIb3DQEBBQUAMIGAMQswCQYD
14
+ MIIFvjCCA6agAwIBAgIJAPXjfUbCjdXWMA0GCSqGSIb3DQEBCwUAMIGAMQswCQYD
15
15
  VQQGEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEO
16
16
  MAwGA1UECgwFUlNwZWMxEzARBgNVBAMMCnJzcGVjLmluZm8xJTAjBgkqhkiG9w0B
17
- CQEWFnJzcGVjQGdvb2dsZWdyb3Vwcy5jb20wHhcNMTQxMjIzMDkzNTIyWhcNMjQx
18
- MjIyMDkzNTIyWjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24x
17
+ CQEWFnJzcGVjQGdvb2dsZWdyb3Vwcy5jb20wHhcNMjYwMjE3MTE0ODM0WhcNMjcw
18
+ MjE3MTE0ODM0WjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24x
19
19
  EDAOBgNVBAcMB1NlYXR0bGUxDjAMBgNVBAoMBVJTcGVjMRMwEQYDVQQDDApyc3Bl
20
20
  Yy5pbmZvMSUwIwYJKoZIhvcNAQkBFhZyc3BlY0Bnb29nbGVncm91cHMuY29tMIIC
21
21
  IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsSmjgcHaKlD0jizRJowi2bGI
@@ -29,22 +29,21 @@ cert_chain:
29
29
  Xeh3EVdWY3vMB1pkhPwlsenpcmj5gOzrd54lELOVbCGHCf48iSqeflY2Lhe0pvzK
30
30
  blXCJBDmtrebvus291rM/dHcbEfK1SVd5Wut/n131iouf6dnNCFskFygDcgBbthC
31
31
  gpEMqf80lEmhX59VUsm0Pv6OEo+ZPHBvXPiJA6DShQh9t3YtpwyA8uVDMbT/i32u
32
- 2FUsqZbbJcCmkBrGposCAwEAAaNQME4wHQYDVR0OBBYEFPPvQ5XT0Nvuhi6k+hrW
33
- Vv35J+TeMB8GA1UdIwQYMBaAFPPvQ5XT0Nvuhi6k+hrWVv35J+TeMAwGA1UdEwQF
34
- MAMBAf8wDQYJKoZIhvcNAQEFBQADggIBAIqbQSWH2aAF537DKwAMB8nMFsoe24MD
35
- gtuQAyjTtbH+QBE4N2RdQF/sU7Y3PYR7nqdrCsYc3RxyqM5XXi7I3IYdpfe1RuxY
36
- +pyPzVQsPPDhMlJlCrwJsADnxlpxZlAgxYSLKOan55ihscaAWA90wqRUrf/ZJM36
37
- 8LWCPVn5teIt5aaxZWX68RMxa+AXvpbtJOBwXLkIFk3apD8CX4DhelIdw67DbkUe
38
- ghUd/u62qrnqBTVgditt7OoWIZjzh24/Fda5d0MxZyvLILGOrf5bN4cTbe/q9Cid
39
- Xrik7Upm+mu3y3yQIfrw85xybHq6iNXyYHvCdSrFfCIKrGpd/0CAdmYnJlx59Fk/
40
- UbD3Eyx4psBSkU+WKO0Uf+3zNI7N/nVeNIwU/Ft+l8l7/K+427656c+ZGWDO0Gt/
41
- BeEOSTDKP7qQ1T+JvMrBcBQo+i0cnRT10J1aoV90BhxsvWTRizIbugbaqR6Tq3bj
42
- Akt00cIlNSplL6DenIAKSh5kF7s0tRD0tC3bNkZmNjNGkdoGEcUODEpTB3RHKKiu
43
- e6k2Jg6m00z5vGFQhOnROG/QaUzMA3A3mFBe1RHFo07xd0pFeoeWL3vF69Gx9Jwp
44
- ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
45
- F3MdtaDehhjC
32
+ 2FUsqZbbJcCmkBrGposCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
33
+ HQYDVR0OBBYEFPPvQ5XT0Nvuhi6k+hrWVv35J+TeMA0GCSqGSIb3DQEBCwUAA4IC
34
+ AQBaeeGIZtBFDP33D1/4sXldSgwntVcL5qC5pcjamLWM4HK4/a6ePMy1uoX+dEnJ
35
+ J+BjZWURsUfFOob+xnUe8AMSbv9gupckfVehZoBzOvJDaWcALo8GKjJlmVtzEIqZ
36
+ TvBLO5zQwR4cWIrg0NWjkDOSQOrNNQ2Degv/aOFrR8dFPJSgxZG/IC0/t6s72cEt
37
+ V4SIe/NLIU4RyBzfgn/RBsalDEF1yIVlDWspMa78clS3bPmntkNyfLwIUwINDHhn
38
+ swFA8bEKMQWqRlupuRmEiy3nGe6az46YlPXzK5UWfXJ6Lb1wIE8W80TRx0HpSC7j
39
+ JfXPfQ0PLgiU4nnQqain2bIn96Ooco8kspeqp8rSJ8sbaMPTNmcFuwD3gzWsRnJ3
40
+ rIaJbmrUcq6DlJ7jfv3u5TPt4JWzDP7oDPf3nXNiF2Cn48Ne598G5lHH6Heyxe39
41
+ pYZdhEptKJWPHxbJWHXD02omKprkNuQKHpnXrW+mmbiO4IcqAMggiud+DaEQg20x
42
+ Dae4cNbvK5p3D+5xqvcEO2G4uCMDmJjrSd61kvTLBnm1qroHqrpi9GauEVWZZmD0
43
+ n0ph8oFAXOsKQWxZ+4uh6yGISk+WhngCZEVPZUjq7SIGAuVhQy2ZgwdjnLEz//lD
44
+ x0Qexp5yGeoxAL9qKM/RXYKtuRZBJV1z+L9A1YOtwaXXNg==
46
45
  -----END CERTIFICATE-----
47
- date: 2024-10-02 00:00:00.000000000 Z
46
+ date: 1980-01-02 00:00:00.000000000 Z
48
47
  dependencies:
49
48
  - !ruby/object:Gem::Dependency
50
49
  name: rspec-support
@@ -80,68 +79,6 @@ dependencies:
80
79
  - - "<"
81
80
  - !ruby/object:Gem::Version
82
81
  version: '2.0'
83
- - !ruby/object:Gem::Dependency
84
- name: rake
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">"
88
- - !ruby/object:Gem::Version
89
- version: 10.0.0
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">"
95
- - !ruby/object:Gem::Version
96
- version: 10.0.0
97
- - !ruby/object:Gem::Dependency
98
- name: cucumber
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '1.3'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '1.3'
111
- - !ruby/object:Gem::Dependency
112
- name: aruba
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: 1.1.0
118
- - - "<"
119
- - !ruby/object:Gem::Version
120
- version: 3.0.0
121
- type: :development
122
- prerelease: false
123
- version_requirements: !ruby/object:Gem::Requirement
124
- requirements:
125
- - - ">="
126
- - !ruby/object:Gem::Version
127
- version: 1.1.0
128
- - - "<"
129
- - !ruby/object:Gem::Version
130
- version: 3.0.0
131
- - !ruby/object:Gem::Dependency
132
- name: minitest
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: '5.2'
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: '5.2'
145
82
  description: RSpec's 'test double' framework, with support for stubbing and mocking
146
83
  email: rspec@googlegroups.com
147
84
  executables: []
@@ -194,15 +131,16 @@ files:
194
131
  - lib/rspec/mocks/verifying_message_expectation.rb
195
132
  - lib/rspec/mocks/verifying_proxy.rb
196
133
  - lib/rspec/mocks/version.rb
197
- homepage: https://github.com/rspec/rspec-mocks
134
+ homepage: https://rspec.info
198
135
  licenses:
199
136
  - MIT
200
137
  metadata:
201
- bug_tracker_uri: https://github.com/rspec/rspec-mocks/issues
202
- changelog_uri: https://github.com/rspec/rspec-mocks/blob/v3.13.2/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.8/rspec-mocks/Changelog.md
203
140
  documentation_uri: https://rspec.info/documentation/
204
141
  mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
205
- source_code_uri: https://github.com/rspec/rspec-mocks
142
+ rubygems_mfa_required: 'true'
143
+ source_code_uri: https://github.com/rspec/rspec/blob/rspec-mocks-v3.13.8/rspec-mocks
206
144
  rdoc_options:
207
145
  - "--charset=UTF-8"
208
146
  require_paths:
@@ -218,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
156
  - !ruby/object:Gem::Version
219
157
  version: '0'
220
158
  requirements: []
221
- rubygems_version: 3.6.0.dev
159
+ rubygems_version: 4.0.6
222
160
  specification_version: 4
223
- summary: rspec-mocks-3.13.2
161
+ summary: rspec-mocks-3.13.8
224
162
  test_files: []
metadata.gz.sig CHANGED
Binary file