Hello,
If a change assert fails we get a oneliner failure message like
expected `object.data` to have changed to { "key" => "value" }, but is now { "something" => "else" }
With a bulkier object (array of hashes, a large hash, it's common) the dividing part ", but is now" is hard to see.
Let's improve the readability of failures like this!
There are a number of ways to go about this, but one I've come up with is a three-line formatting - first describes the nature of the change failure (did not change/ changed to wrong value etc.), second shows expectation, and third shows the gotten value, aligned to the second row for easier diff, like so:
expected `object.data` to have changed, but the new value did not match expectation:
expected: { "key" => "value" }
was: { "something" => "else" }
Is this something worth opening a PR for? Which github project should I look at?