rspec-mocks 3.5.0 → 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 +5 -5
- checksums.yaml.gz.sig +0 -0
- data/Changelog.md +392 -84
- data/README.md +27 -7
- data/lib/rspec/mocks/any_instance/chain.rb +1 -0
- data/lib/rspec/mocks/any_instance/expect_chain_chain.rb +1 -5
- data/lib/rspec/mocks/any_instance/expectation_chain.rb +7 -5
- data/lib/rspec/mocks/any_instance/message_chains.rb +1 -1
- data/lib/rspec/mocks/any_instance/proxy.rb +12 -3
- data/lib/rspec/mocks/any_instance/recorder.rb +23 -11
- data/lib/rspec/mocks/any_instance/stub_chain.rb +9 -5
- data/lib/rspec/mocks/any_instance/stub_chain_chain.rb +1 -6
- data/lib/rspec/mocks/argument_list_matcher.rb +20 -3
- data/lib/rspec/mocks/argument_matchers.rb +54 -8
- data/lib/rspec/mocks/configuration.rb +7 -0
- data/lib/rspec/mocks/error_generator.rb +34 -13
- data/lib/rspec/mocks/example_methods.rb +14 -2
- data/lib/rspec/mocks/instance_method_stasher.rb +11 -0
- data/lib/rspec/mocks/matchers/have_received.rb +6 -2
- data/lib/rspec/mocks/matchers/receive.rb +4 -2
- data/lib/rspec/mocks/matchers/receive_message_chain.rb +2 -2
- data/lib/rspec/mocks/matchers/receive_messages.rb +1 -1
- data/lib/rspec/mocks/message_expectation.rb +129 -13
- data/lib/rspec/mocks/method_double.rb +37 -8
- data/lib/rspec/mocks/method_reference.rb +22 -10
- data/lib/rspec/mocks/minitest_integration.rb +1 -1
- data/lib/rspec/mocks/mutate_const.rb +6 -2
- data/lib/rspec/mocks/order_group.rb +15 -4
- data/lib/rspec/mocks/proxy.rb +48 -20
- data/lib/rspec/mocks/space.rb +1 -1
- data/lib/rspec/mocks/syntax.rb +1 -1
- data/lib/rspec/mocks/targets.rb +1 -1
- data/lib/rspec/mocks/test_double.rb +9 -5
- data/lib/rspec/mocks/verifying_double.rb +6 -10
- data/lib/rspec/mocks/verifying_message_expectation.rb +1 -0
- data/lib/rspec/mocks/verifying_proxy.rb +11 -3
- data/lib/rspec/mocks/version.rb +1 -1
- data/lib/rspec/mocks.rb +4 -1
- data.tar.gz.sig +0 -0
- metadata +30 -86
- metadata.gz.sig +0 -0
data/Changelog.md
CHANGED
|
@@ -1,17 +1,324 @@
|
|
|
1
|
+
### Development
|
|
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)
|
|
55
|
+
|
|
56
|
+
### 3.13.2 / 2024-10-02
|
|
57
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.13.1...v3.13.2)
|
|
58
|
+
|
|
59
|
+
Bug Fixes:
|
|
60
|
+
|
|
61
|
+
* Support keyword arguments in callables passed to `and_invoke`. (Jon Rowe, rspec/rspec-mocks#1595)
|
|
62
|
+
|
|
63
|
+
### 3.13.1 / 2024-05-08
|
|
64
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.13.0...v3.13.1)
|
|
65
|
+
|
|
66
|
+
Bug Fixes:
|
|
67
|
+
|
|
68
|
+
* Use `RSpec::Support::Mutex` in `RSpec::Mocks::Proxy` to avoid issues from
|
|
69
|
+
stubbing `::Mutex#new`. (Eric Mueller, rspec/rspec-mocks#1575)
|
|
70
|
+
|
|
71
|
+
### 3.13.0 / 2024-02-04
|
|
72
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.7...v3.13.0)
|
|
73
|
+
|
|
74
|
+
Enhancements:
|
|
75
|
+
|
|
76
|
+
* Add an `array_excluding` matcher for arguments. (Zane Wolfgang Pickett, rspec/rspec-mocks#1528)
|
|
77
|
+
|
|
78
|
+
### 3.12.7 / 2024-02-04
|
|
79
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.6...v3.12.7)
|
|
80
|
+
|
|
81
|
+
Bug Fixes:
|
|
82
|
+
|
|
83
|
+
* Reduce allocations from "any_instance" style mocks. (Carlos Palhares, rspec/rspec-mocks#1479)
|
|
84
|
+
|
|
85
|
+
### 3.12.6 / 2023-07-11
|
|
86
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.5...v3.12.6)
|
|
87
|
+
|
|
88
|
+
Bug Fixes:
|
|
89
|
+
|
|
90
|
+
* Fix an issue with `and_call_original` when using the `method_missing` fallback
|
|
91
|
+
with keyword arguments. (Igor Drozdov, rspec/rspec-mocks#1552)
|
|
92
|
+
|
|
93
|
+
### 3.12.5 / 2023-03-30
|
|
94
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.4...v3.12.5)
|
|
95
|
+
|
|
96
|
+
Bug Fixes:
|
|
97
|
+
|
|
98
|
+
* Fix compatibility issue with Rails where active_support monkey patches `with`
|
|
99
|
+
when using any instance. (Lachlan Sylvester, rspec/rspec-mocks#1540)
|
|
100
|
+
|
|
101
|
+
### 3.12.4 / 2023-03-12
|
|
102
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.3...v3.12.4)
|
|
103
|
+
|
|
104
|
+
Bug Fixes:
|
|
105
|
+
|
|
106
|
+
* Fix an issue with asserting that Array#reverse is never called. (Brad Trick, rspec/rspec-mocks#1533)
|
|
107
|
+
* Fix compatibility issue with Rails where active_support monkey patches `with`.
|
|
108
|
+
(Jean Boussier, rspec/rspec-mocks#1531, rspec/rspec-mocks#1534)
|
|
109
|
+
|
|
110
|
+
### 3.12.3 / 2023-01-17
|
|
111
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.2...v3.12.3)
|
|
112
|
+
|
|
113
|
+
Bug Fixes:
|
|
114
|
+
|
|
115
|
+
* Fix keyword delegation in `send` for verifying doubles on Ruby 3.
|
|
116
|
+
(Charlie Honig, rspec/rspec-mocks#1485)
|
|
117
|
+
|
|
118
|
+
### 3.12.2 / 2023-01-07
|
|
119
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.1...v3.12.2)
|
|
120
|
+
|
|
121
|
+
Bug Fixes:
|
|
122
|
+
|
|
123
|
+
* Fix implementation blocks for mocks using keyword arguments on Ruby 3.2.0.
|
|
124
|
+
(Adam Steel, rspec/rspec-mocks#1508)
|
|
125
|
+
* Fix keyword argument assertions when mocking using `with` on Ruby 3.2.0.
|
|
126
|
+
(Slava Kardakov, Benoit Tigeot, Phil Pirozhkov, Benoit Daloze, rspec/rspec-mocks#1514)
|
|
127
|
+
|
|
128
|
+
### 3.12.1 / 2022-12-10
|
|
129
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.12.0...v3.12.1)
|
|
130
|
+
|
|
131
|
+
Bug Fixes:
|
|
132
|
+
|
|
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)
|
|
135
|
+
* Change check to detect frozen objects to rescue errors rather than
|
|
136
|
+
pre-empting by checking `frozen?` due to some objects mis-behaving.
|
|
137
|
+
(Keegan Roth, rspec/rspec-mocks#1401)
|
|
138
|
+
* Prevent unfulfilled expectations using `expect_any_instance_of` across a class
|
|
139
|
+
inheritance boundary from raising rather than failing. (Jon Rowe, rspec/rspec-mocks#1496)
|
|
140
|
+
* Prevent a misleading error message when using `allow(...).not_to` with
|
|
141
|
+
unsupported matchers. (Phil Pirozhkov, rspec/rspec-mocks#1503)
|
|
142
|
+
|
|
143
|
+
### 3.12.0 / 2022-10-26
|
|
144
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.2...v3.12.0)
|
|
145
|
+
|
|
146
|
+
Enhancements:
|
|
147
|
+
|
|
148
|
+
* Improve diff output when diffing keyword arguments against hashes.
|
|
149
|
+
(Jean Boussier, rspec/rspec-mocks#1461)
|
|
150
|
+
|
|
151
|
+
### 3.11.2 / 2022-10-25
|
|
152
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.1...v3.11.2)
|
|
153
|
+
|
|
154
|
+
Bug Fixes:
|
|
155
|
+
|
|
156
|
+
* Use the original implementation of `Class.new` to detect overridden definitions
|
|
157
|
+
of `new` rather than the owner, fixing detection of "double aliased" methods
|
|
158
|
+
in Ruby 3 and above. (Benoit Daloze, rspec/rspec-mocks#1470, rspec/rspec-mocks#1476)
|
|
159
|
+
* Support keyword argument semantics when constraining argument expectations using
|
|
160
|
+
`with` on Ruby 3.0+ with `instance_double` (Andrii Malyshko, rspec/rspec-mocks#1473)
|
|
161
|
+
|
|
162
|
+
### 3.11.1 / 2022-03-31
|
|
163
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.0...v3.11.1)
|
|
164
|
+
|
|
165
|
+
Bug Fixes:
|
|
166
|
+
|
|
167
|
+
* Add extra `ruby2_keywords` calls to properly designate methods using
|
|
168
|
+
`*args` to pass keyword around, fixes an issue with TruffleRuby.
|
|
169
|
+
(Benoit Daloze, rspec/rspec-mocks#1464)
|
|
170
|
+
|
|
171
|
+
### 3.11.0 / 2022-02-09
|
|
172
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.3...v3.11.0)
|
|
173
|
+
|
|
174
|
+
Enhancements:
|
|
175
|
+
|
|
176
|
+
* Add `and_invoke` implementation for configuring responses to `receive`
|
|
177
|
+
(and `receive_messages`) with multiple callable objects. (Kyle Smith, rspec/rspec-mocks#1411)
|
|
178
|
+
|
|
179
|
+
### 3.10.3 / 2022-01-28
|
|
180
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.2...v3.10.3)
|
|
181
|
+
|
|
182
|
+
Bug Fixes:
|
|
183
|
+
|
|
184
|
+
* Suppress warning by setting `$VERBOSE` to nil. (Nobuyoshi Nakada, rspec/rspec-mocks#1414)
|
|
185
|
+
* Support keyword argument semantics when constraining argument expectations using
|
|
186
|
+
`with` on Ruby 3.0+ (Yusuke Endoh, rspec/rspec-mocks#1394)
|
|
187
|
+
|
|
188
|
+
### 3.10.2 / 2021-01-27
|
|
189
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.1...v3.10.2)
|
|
190
|
+
|
|
191
|
+
Bug Fixes:
|
|
192
|
+
|
|
193
|
+
* Support keyword arguments with `and_call_original` on Ruby 3.0.
|
|
194
|
+
(Bryan Powell, rspec/rspec-mocks#1385)
|
|
195
|
+
* `RSpec::Mocks::Constant#previously_defined?` is now always a boolean.
|
|
196
|
+
(Phil Pirozhkov, rspec/rspec-mocks#1397)
|
|
197
|
+
* Support keyword arguments on Ruby 3.0 when used with `expect_any_instance_of`
|
|
198
|
+
or `allow_any_instance_of` with `and_call_original`.
|
|
199
|
+
(Jess Hottenstein, rspec/rspec-mocks#1407)
|
|
200
|
+
|
|
201
|
+
### 3.10.1 / 2020-12-27
|
|
202
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.0...v3.10.1)
|
|
203
|
+
|
|
204
|
+
Bug Fixes:
|
|
205
|
+
|
|
206
|
+
* Issue `ArgumentError` rather than `TypeError` when unsupported methods on
|
|
207
|
+
unsupported objects are attempted to be stubbed. (@zhisme, rspec/rspec-mocks#1357)
|
|
208
|
+
|
|
209
|
+
### 3.10.0 / 2020-10-30
|
|
210
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.9.1...v3.10.0)
|
|
211
|
+
|
|
212
|
+
Enhancements:
|
|
213
|
+
* Add the ability to set a custom error generator in `MessageExpectation`.
|
|
214
|
+
This will allow rspec-expectations to inject a custom failure message.
|
|
215
|
+
(Benoit Tigeot and Nicolas Zermati, rspec/rspec-mocks#1312)
|
|
216
|
+
* Return the result of the block passed to `RSpec::Mocks.with_temporary_scope`
|
|
217
|
+
when block run. (@expeehaa, rspec/rspec-mocks#1329)
|
|
218
|
+
|
|
219
|
+
### 3.9.1 / 2019-12-31
|
|
220
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.9.0...v3.9.1)
|
|
221
|
+
|
|
222
|
+
Bug Fixes:
|
|
223
|
+
|
|
224
|
+
* Trigger `RSpec::Mocks.configuration.verifying_double_callbacks` when using
|
|
225
|
+
`allow_any_instance_of` or `expect_any_instance_of` (Daniel Orner, rspec/rspec-mocks#1309)
|
|
226
|
+
|
|
227
|
+
### 3.9.0 / 2019-10-07
|
|
228
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.8.2...v3.9.0)
|
|
229
|
+
|
|
230
|
+
Enhancements:
|
|
231
|
+
|
|
232
|
+
* Improve thread safety of message expectations by using Mutex to prevent
|
|
233
|
+
deadlocking errors. (Ry Biesemeyer, rspec/rspec-mocks#1236)
|
|
234
|
+
* Add the ability to use `time` as an alias for `times`. For example:
|
|
235
|
+
`expect(Class).to receive(:method).exactly(1).time`.
|
|
236
|
+
(Pistos, Benoit Tigeot, rspec/rspec-mocks#1271)
|
|
237
|
+
|
|
238
|
+
### 3.8.2 / 2019-10-02
|
|
239
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.8.1...v3.8.2)
|
|
240
|
+
|
|
241
|
+
* Allow `array_including` argument matchers to be nested.
|
|
242
|
+
(Emmanuel Delmas, rspec/rspec-mocks#1291)
|
|
243
|
+
|
|
244
|
+
### 3.8.1 / 2019-06-13
|
|
245
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.8.0...v3.8.1)
|
|
246
|
+
|
|
247
|
+
Bug Fixes:
|
|
248
|
+
|
|
249
|
+
* Ensure stubbing methods does not change their visibility.
|
|
250
|
+
(Kevin Boschert, rspec/rspec-mocks#1277)
|
|
251
|
+
|
|
252
|
+
### 3.8.0 / 2018-08-04
|
|
253
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.7.0...v3.8.0)
|
|
254
|
+
|
|
255
|
+
Bug Fixes:
|
|
256
|
+
|
|
257
|
+
* Issue error when encountering invalid "counted" negative message expectations.
|
|
258
|
+
(Sergiy Yarinovskiy, rspec/rspec-mocks#1212)
|
|
259
|
+
* Ensure `allow_any_instance_of` and `expect_any_instance_of` can be temporarily
|
|
260
|
+
supressed. (Jon Rowe, rspec/rspec-mocks#1228)
|
|
261
|
+
* Ensure `expect_any_instance_of(double).to_not have_received(:some_method)`
|
|
262
|
+
fails gracefully (as its not supported) rather than issuing a `NoMethodError`.
|
|
263
|
+
(Maxim Krizhanovsky, rspec/rspec-mocks#1231)
|
|
264
|
+
|
|
265
|
+
### 3.7.0 / 2017-10-17
|
|
266
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.6.0...v3.7.0)
|
|
267
|
+
|
|
268
|
+
Enhancements:
|
|
269
|
+
|
|
270
|
+
* Improve compatibility with `--enable-frozen-string-literal` option
|
|
271
|
+
on Ruby 2.3+. (Pat Allan, rspec/rspec-mocks#1165)
|
|
272
|
+
|
|
273
|
+
Bug Fixes:
|
|
274
|
+
|
|
275
|
+
* Fix `hash_including` and `hash_excluding` so that they work against
|
|
276
|
+
subclasses of `Hash`. (Aaron Rosenberg, rspec/rspec-mocks#1167)
|
|
277
|
+
|
|
278
|
+
### 3.6.0 / 2017-05-04
|
|
279
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.6.0.beta2...v3.6.0)
|
|
280
|
+
|
|
281
|
+
Bug Fixes:
|
|
282
|
+
|
|
283
|
+
* Fix "instance variable @color not initialized" warning when using
|
|
284
|
+
rspec-mocks without rspec-core. (Myron Marston, rspec/rspec-mocks#1142)
|
|
285
|
+
* Restore aliased module methods properly when stubbing on 1.8.7.
|
|
286
|
+
(Samuel Giddins, rspec/rspec-mocks#1144)
|
|
287
|
+
* Allow a message chain expectation to be constrained by argument(s).
|
|
288
|
+
(Jon Rowe, rspec/rspec-mocks#1156)
|
|
289
|
+
|
|
290
|
+
### 3.6.0.beta2 / 2016-12-12
|
|
291
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.6.0.beta1...v3.6.0.beta2)
|
|
292
|
+
|
|
293
|
+
Enhancements:
|
|
294
|
+
|
|
295
|
+
* Add new `without_partial_double_verification { }` API that lets you
|
|
296
|
+
temporarily turn off partial double verification for an example.
|
|
297
|
+
(Jon Rowe, rspec/rspec-mocks#1104)
|
|
298
|
+
|
|
299
|
+
### 3.6.0.beta1 / 2016-10-09
|
|
300
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0...v3.6.0.beta1)
|
|
301
|
+
|
|
302
|
+
Bug Fixes:
|
|
303
|
+
|
|
304
|
+
* Return the test double instance form `#freeze` (Alessandro Berardi, rspec/rspec-mocks#1109)
|
|
305
|
+
* Allow the special logic for stubbing `new` to work when `<Class>.method` has
|
|
306
|
+
been redefined. (Proby, rspec/rspec-mocks#1119)
|
|
307
|
+
|
|
1
308
|
### 3.5.0 / 2016-07-01
|
|
2
309
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta4...v3.5.0)
|
|
3
310
|
|
|
4
311
|
Enhancements:
|
|
5
312
|
|
|
6
313
|
* Provides a nice string representation of
|
|
7
|
-
`RSpec::Mocks::MessageExpectation` (Myron Marston, #1095)
|
|
314
|
+
`RSpec::Mocks::MessageExpectation` (Myron Marston, rspec/rspec-mocks#1095)
|
|
8
315
|
|
|
9
316
|
### 3.5.0.beta4 / 2016-06-05
|
|
10
317
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta3...v3.5.0.beta4)
|
|
11
318
|
|
|
12
319
|
Enhancements:
|
|
13
320
|
|
|
14
|
-
* 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)
|
|
15
322
|
|
|
16
323
|
### 3.5.0.beta3 / 2016-04-02
|
|
17
324
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta2...v3.5.0.beta3)
|
|
@@ -19,9 +326,9 @@ Enhancements:
|
|
|
19
326
|
Enhancements:
|
|
20
327
|
|
|
21
328
|
* Issue warning when attempting to use unsupported
|
|
22
|
-
`allow(...).to receive(...).ordered`. (Jon Rowe, #1000)
|
|
329
|
+
`allow(...).to receive(...).ordered`. (Jon Rowe, rspec/rspec-mocks#1000)
|
|
23
330
|
* Add `rspec/mocks/minitest_integration`, to properly integrate rspec-mocks
|
|
24
|
-
with minitest. (Myron Marston, #1065)
|
|
331
|
+
with minitest. (Myron Marston, rspec/rspec-mocks#1065)
|
|
25
332
|
|
|
26
333
|
### 3.5.0.beta2 / 2016-03-10
|
|
27
334
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta1...v3.5.0.beta2)
|
|
@@ -29,12 +336,12 @@ Enhancements:
|
|
|
29
336
|
Enhancements:
|
|
30
337
|
|
|
31
338
|
* Improve error message displayed when using `and_wrap_original` on pure test
|
|
32
|
-
doubles. (betesh, #1063)
|
|
339
|
+
doubles. (betesh, rspec/rspec-mocks#1063)
|
|
33
340
|
|
|
34
341
|
Bug Fixes:
|
|
35
342
|
|
|
36
343
|
* Fix issue that prevented `receive_message_chain(...).with(...)` working
|
|
37
|
-
correctly on "any instance" mocks. (Jon Rowe, #1061)
|
|
344
|
+
correctly on "any instance" mocks. (Jon Rowe, rspec/rspec-mocks#1061)
|
|
38
345
|
|
|
39
346
|
### 3.5.0.beta1 / 2016-02-06
|
|
40
347
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.4.1...v3.5.0.beta1)
|
|
@@ -42,20 +349,20 @@ Bug Fixes:
|
|
|
42
349
|
Bug Fixes:
|
|
43
350
|
|
|
44
351
|
* Allow `any_instance_of(...).to receive(...)` to use `and_yield` multiple
|
|
45
|
-
times. (Kilian Cirera Sant, #1054)
|
|
352
|
+
times. (Kilian Cirera Sant, rspec/rspec-mocks#1054)
|
|
46
353
|
* Allow matchers which inherit from `rspec-mocks` matchers to be used for
|
|
47
|
-
`allow`. (Andrew Kozin, #1056)
|
|
354
|
+
`allow`. (Andrew Kozin, rspec/rspec-mocks#1056)
|
|
48
355
|
* Prevent stubbing `respond_to?` on partial doubles from causing infinite
|
|
49
|
-
recursion. (Jon Rowe, #1013)
|
|
356
|
+
recursion. (Jon Rowe, rspec/rspec-mocks#1013)
|
|
50
357
|
* Prevent aliased methods from disapearing after being mocked with
|
|
51
|
-
`any_instance` (regression from #1043). (Joe Rafaniello, #1060)
|
|
358
|
+
`any_instance` (regression from rspec/rspec-mocks#1043). (Joe Rafaniello, rspec/rspec-mocks#1060)
|
|
52
359
|
|
|
53
360
|
### 3.4.1 / 2016-01-10
|
|
54
361
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.4.0...v3.4.1)
|
|
55
362
|
|
|
56
363
|
Bug Fixes:
|
|
57
364
|
|
|
58
|
-
* 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)
|
|
59
366
|
|
|
60
367
|
### 3.4.0 / 2015-11-11
|
|
61
368
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.2...v3.4.0)
|
|
@@ -63,18 +370,18 @@ Bug Fixes:
|
|
|
63
370
|
Enhancements:
|
|
64
371
|
|
|
65
372
|
* Make `expect(...).to have_received` work without relying upon
|
|
66
|
-
rspec-expectations. (Myron Marston, #978)
|
|
373
|
+
rspec-expectations. (Myron Marston, rspec/rspec-mocks#978)
|
|
67
374
|
* Add option for failing tests when expectations are set on `nil`.
|
|
68
|
-
(Liz Rush, #983)
|
|
375
|
+
(Liz Rush, rspec/rspec-mocks#983)
|
|
69
376
|
|
|
70
377
|
Bug Fixes:
|
|
71
378
|
|
|
72
379
|
* Fix `have_received { ... }` so that any block passed when the message
|
|
73
|
-
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)
|
|
74
381
|
* Fix infinite loop in error generator when stubbing `respond_to?`.
|
|
75
|
-
(Alex Dowad, #1022)
|
|
382
|
+
(Alex Dowad, rspec/rspec-mocks#1022)
|
|
76
383
|
* Fix issue with using `receive` on subclasses (at a class level) with 1.8.7.
|
|
77
|
-
(Alex Dowad, #1026)
|
|
384
|
+
(Alex Dowad, rspec/rspec-mocks#1026)
|
|
78
385
|
|
|
79
386
|
### 3.3.2 / 2015-07-15
|
|
80
387
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.1...v3.3.2)
|
|
@@ -82,7 +389,7 @@ Bug Fixes:
|
|
|
82
389
|
Bug Fixes:
|
|
83
390
|
|
|
84
391
|
* Prevent thread deadlock errors during proxy creation (e.g. when using
|
|
85
|
-
`before_verifying_doubles` callbacks). (Jon Rowe, #980, #979)
|
|
392
|
+
`before_verifying_doubles` callbacks). (Jon Rowe, rspec/rspec-mocks#980, rspec/rspec-mocks#979)
|
|
86
393
|
|
|
87
394
|
### 3.3.1 / 2015-06-19
|
|
88
395
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.0...v3.3.1)
|
|
@@ -92,7 +399,7 @@ Bug Fixes:
|
|
|
92
399
|
* Fix bug in `before_verifying_double` callback logic that caused it to be called
|
|
93
400
|
once for each class in the ancestor list when mocking or stubbing a class. Now
|
|
94
401
|
it is only called for the mocked or stubbed class, as you would expect. (Sam
|
|
95
|
-
Phippen, #974)
|
|
402
|
+
Phippen, rspec/rspec-mocks#974)
|
|
96
403
|
|
|
97
404
|
### 3.3.0 / 2015-06-12
|
|
98
405
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.2.1...v3.3.0)
|
|
@@ -101,45 +408,45 @@ Enhancements:
|
|
|
101
408
|
|
|
102
409
|
* When stubbing `new` on `MyClass` or `class_double(MyClass)`, use the
|
|
103
410
|
method signature from `MyClass#initialize` to verify arguments.
|
|
104
|
-
(Myron Marston, #886)
|
|
411
|
+
(Myron Marston, rspec/rspec-mocks#886)
|
|
105
412
|
* Use matcher descriptions when generating description of received arguments
|
|
106
|
-
for mock expectation failures. (Tim Wade, #891)
|
|
107
|
-
* 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)
|
|
108
415
|
* Verifying doubles failure messages now distinguish between class and instance
|
|
109
|
-
level methods. (Tim Wade, #896, #908)
|
|
416
|
+
level methods. (Tim Wade, rspec/rspec-mocks#896, rspec/rspec-mocks#908)
|
|
110
417
|
* Improve mock expectation failure messages so that it combines both
|
|
111
|
-
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)
|
|
112
419
|
* Improve how test doubles are represented in failure messages.
|
|
113
|
-
(Siva Gollapalli, Myron Marston, #932)
|
|
420
|
+
(Siva Gollapalli, Myron Marston, rspec/rspec-mocks#932)
|
|
114
421
|
* Rename `RSpec::Mocks::Configuration#when_declaring_verifying_double` to
|
|
115
422
|
`RSpec::Mocks::Configuration#before_verifying_doubles` and utilise when
|
|
116
|
-
verifying partial doubles. (Jon Rowe, #940)
|
|
423
|
+
verifying partial doubles. (Jon Rowe, rspec/rspec-mocks#940)
|
|
117
424
|
* Use rspec-support's `ObjectFormatter` for improved formatting of
|
|
118
425
|
arguments in failure messages so that, for example, full time
|
|
119
|
-
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)
|
|
120
427
|
|
|
121
428
|
Bug Fixes:
|
|
122
429
|
|
|
123
430
|
* Ensure expectations that raise eagerly also raise during RSpec verification.
|
|
124
431
|
This means that if exceptions are caught inside test execution the test will
|
|
125
|
-
still fail. (Sam Phippen, #884)
|
|
432
|
+
still fail. (Sam Phippen, rspec/rspec-mocks#884)
|
|
126
433
|
* Fix `have_received(msg).with(args).exactly(n).times` and
|
|
127
434
|
`receive(msg).with(args).exactly(n).times` failure messages
|
|
128
435
|
for when the message was received the wrong number of times with
|
|
129
436
|
the specified args, and also received additional times with other
|
|
130
437
|
arguments. Previously it confusingly listed the arguments as being
|
|
131
438
|
mis-matched (even when the double was allowed to receive with any
|
|
132
|
-
args) rather than listing the count. (John Ceh, #918)
|
|
439
|
+
args) rather than listing the count. (John Ceh, rspec/rspec-mocks#918)
|
|
133
440
|
* Fix `any_args`/`anything` support so that we avoid calling `obj == anything`
|
|
134
441
|
on user objects that may have improperly implemented `==` in a way that
|
|
135
|
-
raises errors. (Myron Marston, #924)
|
|
442
|
+
raises errors. (Myron Marston, rspec/rspec-mocks#924)
|
|
136
443
|
* Fix edge case involving stubbing the same method on a class and a subclass
|
|
137
|
-
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)
|
|
138
445
|
* Fix edge case where the message received count would be incremented multiple
|
|
139
|
-
times for one failure. (Myron Marston, #957)
|
|
446
|
+
times for one failure. (Myron Marston, rspec/rspec-mocks#957)
|
|
140
447
|
* Fix failure messages for when spies received the expected message with
|
|
141
|
-
different arguments and also received another message. (Maurício Linhares, #960)
|
|
142
|
-
* 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)
|
|
143
450
|
|
|
144
451
|
### 3.2.1 / 2015-02-23
|
|
145
452
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.2.0...v3.2.1)
|
|
@@ -148,11 +455,11 @@ Bug Fixes:
|
|
|
148
455
|
|
|
149
456
|
* Add missing `rspec/support/differ` require so that rspec-mocks can be
|
|
150
457
|
used w/o rspec-expectations (which also loads the differ and hided the
|
|
151
|
-
fact we forgot to require it). (Myron Marston, #893)
|
|
458
|
+
fact we forgot to require it). (Myron Marston, rspec/rspec-mocks#893)
|
|
152
459
|
* Revert tracking of received arg mutation (added in 3.2.0 to provide an
|
|
153
460
|
error in a situation we can't support) as our implementation has side
|
|
154
461
|
effects on non-standard objects and there's no solution we could come
|
|
155
|
-
up with that always works. (Myron Marston, #900)
|
|
462
|
+
up with that always works. (Myron Marston, rspec/rspec-mocks#900)
|
|
156
463
|
|
|
157
464
|
### 3.2.0 / 2015-02-03
|
|
158
465
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.3...v3.2.0)
|
|
@@ -160,55 +467,55 @@ Bug Fixes:
|
|
|
160
467
|
Enhancements:
|
|
161
468
|
|
|
162
469
|
* Treat `any_args` as an arg splat, allowing it to match an arbitrary
|
|
163
|
-
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)
|
|
164
471
|
* Print diffs when arguments in mock expectations are mismatched.
|
|
165
|
-
(Sam Phippen, #751)
|
|
472
|
+
(Sam Phippen, rspec/rspec-mocks#751)
|
|
166
473
|
* Support names for verified doubles (`instance_double`, `instance_spy`,
|
|
167
474
|
`class_double`, `class_spy`, `object_double`, `object_spy`). (Cezary
|
|
168
|
-
Baginski, #826)
|
|
475
|
+
Baginski, rspec/rspec-mocks#826)
|
|
169
476
|
* Make `array_including` and `hash_including` argument matchers composable.
|
|
170
|
-
(Sam Phippen, #819)
|
|
477
|
+
(Sam Phippen, rspec/rspec-mocks#819)
|
|
171
478
|
* Make `allow_any_instance_of(...).to receive(...).and_wrap_original`
|
|
172
|
-
work. (Ryan Fitzgerald, #869)
|
|
479
|
+
work. (Ryan Fitzgerald, rspec/rspec-mocks#869)
|
|
173
480
|
|
|
174
481
|
Bug Fixes:
|
|
175
482
|
|
|
176
483
|
* Provide a clear error when users wrongly combine `no_args` with
|
|
177
484
|
additional arguments (e.g. `expect().to receive().with(no_args, 1)`).
|
|
178
|
-
(Myron Marston, #786)
|
|
485
|
+
(Myron Marston, rspec/rspec-mocks#786)
|
|
179
486
|
* Provide a clear error when users wrongly use `any_args` multiple times in the
|
|
180
487
|
same argument list (e.g. `expect().to receive().with(any_args, 1, any_args)`.
|
|
181
|
-
(Myron Marston, #786)
|
|
488
|
+
(Myron Marston, rspec/rspec-mocks#786)
|
|
182
489
|
* Prevent the error generator from using user object #description methods.
|
|
183
|
-
See [#685](https://github.com/rspec/rspec-mocks/issues/685).
|
|
184
|
-
(Sam Phippen, #751)
|
|
490
|
+
See [rspec/rspec-mocks#685](https://github.com/rspec/rspec-mocks/issues/685).
|
|
491
|
+
(Sam Phippen, rspec/rspec-mocks#751)
|
|
185
492
|
* Make verified doubles declared as `(instance|class)_double(SomeConst)`
|
|
186
493
|
work properly when `SomeConst` has previously been stubbed.
|
|
187
494
|
`(instance|class)_double("SomeClass")` already worked properly.
|
|
188
|
-
(Myron Marston, #824)
|
|
495
|
+
(Myron Marston, rspec/rspec-mocks#824)
|
|
189
496
|
* Add a matcher description for `receive`, `receive_messages` and
|
|
190
|
-
`receive_message_chain`. (Myron Marston, #828)
|
|
497
|
+
`receive_message_chain`. (Myron Marston, rspec/rspec-mocks#828)
|
|
191
498
|
* Validate invocation args for null object verified doubles.
|
|
192
|
-
(Myron Marston, #829)
|
|
499
|
+
(Myron Marston, rspec/rspec-mocks#829)
|
|
193
500
|
* Fix `RSpec::Mocks::Constant.original` when called with an invalid
|
|
194
501
|
constant to return an object indicating the constant name is invalid,
|
|
195
|
-
rather than blowing up. (Myron Marston, #833)
|
|
502
|
+
rather than blowing up. (Myron Marston, rspec/rspec-mocks#833)
|
|
196
503
|
* Make `extend RSpec::Mocks::ExampleMethods` on any object work properly
|
|
197
504
|
to add the rspec-mocks API to that object. Previously, `expect` would
|
|
198
|
-
be undefined. (Myron Marston, #846)
|
|
505
|
+
be undefined. (Myron Marston, rspec/rspec-mocks#846)
|
|
199
506
|
* Fix `require 'rspec/mocks/standalone'` so that it only affects `main`
|
|
200
507
|
and not every object. It's really only intended to be used in a REPL
|
|
201
508
|
like IRB, but some gems have loaded it, thinking it needs to be loaded
|
|
202
509
|
when using rspec-mocks outside the context of rspec-core.
|
|
203
|
-
(Myron Marston, #846)
|
|
510
|
+
(Myron Marston, rspec/rspec-mocks#846)
|
|
204
511
|
* Prevent message expectations from being modified by customization methods
|
|
205
|
-
(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)
|
|
206
513
|
* Handle cases where a method stub cannot be removed due to something
|
|
207
514
|
external to RSpec monkeying with the method definition. This can
|
|
208
515
|
happen, for example, when you `file.reopen(io)` after previously
|
|
209
|
-
stubbing a method on the `file` object. (Myron Marston, #853)
|
|
516
|
+
stubbing a method on the `file` object. (Myron Marston, rspec/rspec-mocks#853)
|
|
210
517
|
* Provide a clear error when received message args are mutated before
|
|
211
|
-
a `have_received(...).with(...)` expectation. (Myron Marston, #868)
|
|
518
|
+
a `have_received(...).with(...)` expectation. (Myron Marston, rspec/rspec-mocks#868)
|
|
212
519
|
|
|
213
520
|
### 3.1.3 / 2014-10-08
|
|
214
521
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.2...v3.1.3)
|
|
@@ -216,13 +523,13 @@ Bug Fixes:
|
|
|
216
523
|
Bug Fixes:
|
|
217
524
|
|
|
218
525
|
* Correct received messages count when used with `have_received` matcher.
|
|
219
|
-
(Jon Rowe, #793)
|
|
526
|
+
(Jon Rowe, rspec/rspec-mocks#793)
|
|
220
527
|
* Provide a clear error message when you use `allow_any_instance_of(...)` or
|
|
221
528
|
`expect_any_instance_of(...)` with the `have_received` matcher (they are
|
|
222
529
|
not intended to be used together and previously caused an odd internal
|
|
223
|
-
failure in rspec-mocks). (Jon Rowe, #799).
|
|
530
|
+
failure in rspec-mocks). (Jon Rowe, rspec/rspec-mocks#799).
|
|
224
531
|
* Fix verified double `with` verification so that it applies to method
|
|
225
|
-
stubs. (Myron Marston, #790)
|
|
532
|
+
stubs. (Myron Marston, rspec/rspec-mocks#790)
|
|
226
533
|
|
|
227
534
|
### 3.1.2 / 2014-09-26
|
|
228
535
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.1...v3.1.2)
|
|
@@ -231,7 +538,7 @@ Bug Fixes:
|
|
|
231
538
|
|
|
232
539
|
* Provide a clear error message when you use `allow(...)` with the
|
|
233
540
|
`have_received` matcher (they are not intended to be used together
|
|
234
|
-
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).
|
|
235
542
|
|
|
236
543
|
### 3.1.1 / 2014-09-18
|
|
237
544
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.0...v3.1.1)
|
|
@@ -239,7 +546,7 @@ Bug Fixes:
|
|
|
239
546
|
Bug Fixes:
|
|
240
547
|
|
|
241
548
|
* Prevent included modules being detected as prepended modules on Ruby 2.0
|
|
242
|
-
when using `any_instance_of(...)`. (Tony Novak, #781)
|
|
549
|
+
when using `any_instance_of(...)`. (Tony Novak, rspec/rspec-mocks#781)
|
|
243
550
|
|
|
244
551
|
### 3.1.0 / 2014-09-04
|
|
245
552
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.4...v3.1.0)
|
|
@@ -248,24 +555,24 @@ Enhancements:
|
|
|
248
555
|
|
|
249
556
|
* Add spying methods (`spy`, `ìnstance_spy`, `class_spy` and `object_spy`)
|
|
250
557
|
which create doubles as null objects for use with spying in testing. (Sam
|
|
251
|
-
Phippen, #671)
|
|
558
|
+
Phippen, rspec/rspec-mocks#671)
|
|
252
559
|
* `have_received` matcher will raise "does not implement" errors correctly when
|
|
253
|
-
used with verifying doubles and partial doubles. (Xavier Shay, #722)
|
|
560
|
+
used with verifying doubles and partial doubles. (Xavier Shay, rspec/rspec-mocks#722)
|
|
254
561
|
* Allow matchers to be used in place of keyword arguments in `with`
|
|
255
|
-
expectations. (Xavier Shay, #726)
|
|
562
|
+
expectations. (Xavier Shay, rspec/rspec-mocks#726)
|
|
256
563
|
* Add `thrice` modifier to message expectation interface as a synonym
|
|
257
|
-
for `exactly(3).times`. (Dennis Taylor, #753)
|
|
564
|
+
for `exactly(3).times`. (Dennis Taylor, rspec/rspec-mocks#753)
|
|
258
565
|
* Add more `thrice` synonyms e.g. `.at_least(:thrice)`, `.at_most(:thrice)`,
|
|
259
|
-
`receive(...).thrice` and `have_received(...).thrice`. (Jon Rowe, #754)
|
|
566
|
+
`receive(...).thrice` and `have_received(...).thrice`. (Jon Rowe, rspec/rspec-mocks#754)
|
|
260
567
|
* Add `and_wrap_original` modifier for partial doubles to mutate the
|
|
261
|
-
response from a method. (Jon Rowe, #762)
|
|
568
|
+
response from a method. (Jon Rowe, rspec/rspec-mocks#762)
|
|
262
569
|
|
|
263
570
|
Bug Fixes:
|
|
264
571
|
|
|
265
572
|
* Remove `any_number_of_times` from `any_instance` recorders that were
|
|
266
|
-
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)
|
|
267
574
|
* Prevent included modules being detected as prepended modules on Ruby 2.0.
|
|
268
|
-
(Eugene Kenny, #771)
|
|
575
|
+
(Eugene Kenny, rspec/rspec-mocks#771)
|
|
269
576
|
|
|
270
577
|
### 3.0.4 / 2014-08-14
|
|
271
578
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.3...v3.0.4)
|
|
@@ -273,7 +580,7 @@ Bug Fixes:
|
|
|
273
580
|
Bug Fixes:
|
|
274
581
|
|
|
275
582
|
* Restore `kind_of(x)` to match using `arg.kind_of?(x)` (like RSpec 2)
|
|
276
|
-
rather than `x === arg`. (Jon Rowe, #750)
|
|
583
|
+
rather than `x === arg`. (Jon Rowe, rspec/rspec-mocks#750)
|
|
277
584
|
|
|
278
585
|
### 3.0.3 / 2014-07-21
|
|
279
586
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.2...v3.0.3)
|
|
@@ -281,10 +588,10 @@ Bug Fixes:
|
|
|
281
588
|
Bug Fixes:
|
|
282
589
|
|
|
283
590
|
* `have_received` matcher will raise "does not implement" errors correctly when
|
|
284
|
-
used with verifying doubles and partial doubles. (Xavier Shay, #722)
|
|
591
|
+
used with verifying doubles and partial doubles. (Xavier Shay, rspec/rspec-mocks#722)
|
|
285
592
|
* Make `double.as_null_object.dup` and `double.as_null_object.clone`
|
|
286
|
-
make the copies be null objects. (Myron Marston, #732)
|
|
287
|
-
* 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)
|
|
288
595
|
|
|
289
596
|
### 3.0.2 / 2014-06-19
|
|
290
597
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.1...v3.0.2)
|
|
@@ -292,11 +599,11 @@ Bug Fixes:
|
|
|
292
599
|
Bug Fixes:
|
|
293
600
|
|
|
294
601
|
* Fix edge case that triggered "can't add a new key into hash during
|
|
295
|
-
iteration" during mock verification. (Sam Phippen, Myron Marston, #711)
|
|
602
|
+
iteration" during mock verification. (Sam Phippen, Myron Marston, rspec/rspec-mocks#711)
|
|
296
603
|
* Fix verifying doubles so that when they accidentally leak into another
|
|
297
604
|
example, they provide the same clear error message that normal doubles
|
|
298
|
-
do. (Myron Marston, #718)
|
|
299
|
-
* 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)
|
|
300
607
|
|
|
301
608
|
### 3.0.1 / 2014-06-07
|
|
302
609
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0...v3.0.1)
|
|
@@ -304,10 +611,10 @@ Bug Fixes:
|
|
|
304
611
|
Bug Fixes:
|
|
305
612
|
|
|
306
613
|
* Fix `receive_message_chain(...)` so that it supports `with` just like
|
|
307
|
-
`stub_chain` did. (Jon Rowe, #697)
|
|
614
|
+
`stub_chain` did. (Jon Rowe, rspec/rspec-mocks#697)
|
|
308
615
|
* Fix regression in `expect_any_instance_of` so that it expects the
|
|
309
616
|
message on _any_ instance rather than on _every_ instance.
|
|
310
|
-
(Myron Marston, #699)
|
|
617
|
+
(Myron Marston, rspec/rspec-mocks#699)
|
|
311
618
|
|
|
312
619
|
### 3.0.0 / 2014-06-01
|
|
313
620
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0.rc1...v3.0.0)
|
|
@@ -520,14 +827,14 @@ Bug Fixes:
|
|
|
520
827
|
|
|
521
828
|
Bug Fixes:
|
|
522
829
|
|
|
523
|
-
* 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)
|
|
524
831
|
|
|
525
832
|
### 2.99.3 / 2015-01-09
|
|
526
833
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.2...v2.99.3)
|
|
527
834
|
|
|
528
835
|
Bug Fixes:
|
|
529
836
|
|
|
530
|
-
* 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)
|
|
531
838
|
|
|
532
839
|
### 2.99.2 / 2014-07-21
|
|
533
840
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.1...v2.99.2)
|
|
@@ -535,7 +842,7 @@ Bug Fixes:
|
|
|
535
842
|
Enhancements:
|
|
536
843
|
|
|
537
844
|
* Warn about upcoming change to `#===` matching and `DateTime#===` behaviour.
|
|
538
|
-
(Jon Rowe, #735)
|
|
845
|
+
(Jon Rowe, rspec/rspec-mocks#735)
|
|
539
846
|
|
|
540
847
|
### 2.99.1 / 2014-06-12
|
|
541
848
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0...v2.99.1)
|
|
@@ -543,11 +850,11 @@ Enhancements:
|
|
|
543
850
|
Bug Fixes:
|
|
544
851
|
|
|
545
852
|
* Fix bug that caused errors at the end of each example
|
|
546
|
-
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)
|
|
547
854
|
|
|
548
855
|
Deprecations:
|
|
549
856
|
|
|
550
|
-
* Deprecate freezing a test double. (Yuji Nakayama, #698)
|
|
857
|
+
* Deprecate freezing a test double. (Yuji Nakayama, rspec/rspec-mocks#698)
|
|
551
858
|
|
|
552
859
|
### 2.99.0 / 2014-06-01
|
|
553
860
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0.rc1...v2.99.0)
|
|
@@ -723,8 +1030,8 @@ Bug fixes
|
|
|
723
1030
|
* Fix `Marshal.dump` extension so that it correctly handles nil.
|
|
724
1031
|
(Luke Imhoff, Jon Rowe)
|
|
725
1032
|
* Fix isolation of `allow_message_expectations_on_nil` (Jon Rowe)
|
|
726
|
-
* Use inspect to format actual arguments on expectations in failure messages (#280, Ben Langfeld)
|
|
727
|
-
* 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)
|
|
728
1035
|
|
|
729
1036
|
Deprecations
|
|
730
1037
|
|
|
@@ -850,7 +1157,8 @@ Bug fixes
|
|
|
850
1157
|
* Fix `should_receive` so that when it is called on an `as_null_object`
|
|
851
1158
|
double with no implementation, and there is a previous explicit stub
|
|
852
1159
|
for the same method, the explicit stub remains (rather than being
|
|
853
|
-
|
|
1160
|
+
overridden with the null object implementation--`return self`). (Myron
|
|
1161
|
+
Marston)
|
|
854
1162
|
|
|
855
1163
|
### 2.11.0 / 2012-07-07
|
|
856
1164
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.10.1...v2.11.0)
|
|
@@ -905,7 +1213,7 @@ Bug fixes
|
|
|
905
1213
|
|
|
906
1214
|
* Allow a `as_null_object` to be passed to `with`
|
|
907
1215
|
* Pass proc to block passed to stub (Aubrey Rhodes)
|
|
908
|
-
* Initialize child message expectation args to match any args (#109 -
|
|
1216
|
+
* Initialize child message expectation args to match any args (rspec/rspec-mocks#109 -
|
|
909
1217
|
preethiramdev)
|
|
910
1218
|
|
|
911
1219
|
### 2.8.0 / 2012-01-04
|