Support label for aggregate_failures block

This commit is contained in:
Michael Miller 2021-07-31 12:04:43 -06:00
parent 4c125d98d4
commit f53ffabf6b
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD
3 changed files with 17 additions and 6 deletions

View file

@ -28,5 +28,14 @@ Spectator.describe Spectator do
end
end.to_not raise_error(Spectator::ExpectationFailed)
end
it "supports naming the block" do
expect do
aggregate_failures "contradiction" do
expect(true).to be_false
expect(false).to be_true
end
end.to raise_error(Spectator::MultipleExpectationsFailed, /contradiction/)
end
end
end