Skip to content

Commit b3d8b5e

Browse files
committed
Update README
1 parent 1e8f668 commit b3d8b5e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,38 @@ rspec ./spec/rspec/power_assert_spec.rb:50 # Rspec::PowerAssert Array#map
252252
rspec ./spec/rspec/power_assert_spec.rb:56 # Rspec::PowerAssert Array#map succ each element
253253
```
254254

255+
On RSpec-3.3 or later, support `aggregate_failures`
256+
(Thanks sue445)
257+
258+
```
259+
2) Rspec::PowerAssert Array#map When use aggregate_failures should be called be is_asserted_by with 3 times
260+
Got 2 failures from failure aggregation block.
261+
# ./spec/rspec/power_assert_spec.rb:81:in `block (5 levels) in <top (required)>'
262+
263+
2.1) Failure/Error: is_asserted_by { subject.map(&:upcase) == %w(a b c) }
264+
is_asserted_by { subject.map(&:upcase) == %w(a b c) }
265+
| | |
266+
| | false
267+
| ["A", "B", "C"]
268+
["a", "b", "c"]
269+
# ./lib/rspec/power_assert.rb:81:in `handle_result_and_message'
270+
# ./lib/rspec/power_assert.rb:50:in `is_asserted_by'
271+
# ./spec/rspec/power_assert_spec.rb:82:in `block (6 levels) in <top (required)>'
272+
273+
2.2) Failure/Error: is_asserted_by { subject.map(&:upcase) == %w(A B C D) }
274+
is_asserted_by { subject.map(&:upcase) == %w(A B C D) }
275+
| | |
276+
| | false
277+
| ["A", "B", "C"]
278+
["a", "b", "c"]
279+
# ./lib/rspec/power_assert.rb:81:in `handle_result_and_message'
280+
# ./lib/rspec/power_assert.rb:50:in `is_asserted_by'
281+
# ./spec/rspec/power_assert_spec.rb:84:in `block (6 levels) in <top (required)>'
282+
283+
Finished in 0.02937 seconds (files took 0.19416 seconds to load)
284+
2 examples, 2 failures
285+
```
286+
255287
## Contributing
256288

257289
1. Fork it ( https://github.com/joker1007/rspec-power_assert/fork )

0 commit comments

Comments
 (0)