expectresult

ScalaTest 106: Printing expected and actual values when a test fails

Problem: You’d like to have better output from your ScalaTest assert tests, output that shows the expected and actual values.

Solution

One approach is to use the === method instead of ==. When an assert test fails, the === method output shows the two values from the test.