Handle multiple failures in aggregate_failures block
TimAle opened this issue · 2 comments
TimAle commented
RSpec 3.3 allows to group multiple failures using aggregrate_failures, but formatter doesn't not handle it. It just puts
<testcase classname="spec.sample_test" name="test with aggregate_failures with multiple failures" file="./spec/sample_test.rb" time="0.037076"><failure message="RSpec::Expectations::MultipleExpectationsNotMetError" type="RSpec::Expectations::MultipleExpectationsNotMetError">
./spec/sample_test.rb:4:in `block (2 levels) in <top (required)>'</failure></testcase>
when RSpec output is
Failures:
1) test with aggregate_failures with multiple failures
Got 3 failures from failure aggregation block "multiple failures".
# ./spec/sample_test.rb:4:in `block (2 levels) in <top (required)>'
1.1) Failure/Error: expect(0).to eq 1
expected: 1
got: 0
(compared using ==)
# ./spec/sample_test.rb:5:in `block (3 levels) in <top (required)>'
1.2) Failure/Error: expect(2).to eq 3
expected: 3
got: 2
(compared using ==)
# ./spec/sample_test.rb:6:in `block (3 levels) in <top (required)>'
1.3) Failure/Error: expect(4).to eq 5
expected: 5
got: 4
(compared using ==)
# ./spec/sample_test.rb:7:in `block (3 levels) in <top (required)>'
Is there a way to handle it?
xuantuan58 commented
We got exactly the same issue, what's the Issue/PR status?
jasoncodes commented