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