File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,38 @@ rspec ./spec/rspec/power_assert_spec.rb:50 # Rspec::PowerAssert Array#map
252252rspec ./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
2572891 . Fork it ( https://github.com/joker1007/rspec-power_assert/fork )
You can’t perform that action at this time.
0 commit comments