This may have been discussed some time ago, but I don't recall the answer:
Suppose I have a test that tests several assertions. Currently, ScalaTest fails the entire test upon encountering the first assertion failure. Is there a way to:
* Have ScalaTest perform all assertions in a test
* Fail the test if any assertions fail
* List all errors at the time of failing the test
For example:
test("Want to see all errors") {
assert(1 == 2)
assert(2 == 3)
}
I'd like it to keep going after the first failure, and then return a message to the effect, e.g., "1 was not 2, 2 was not 3". Is that possible?
I'm familiar with Scalactic's Accumulator, so I know I can use that, but I wonder if there's a way to do that easily in ScalaTest.
This feature would be useful after a refactoring where several assertions might suddenly fail in a test, and it'd be good to get a quick report of what failed without having to keep re-running the test.
Thanks.