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