[rspec-users] Nicer failure message formatting

Wincent Colaiuta win at wincent.com
Fri Jun 22 09:34:43 EDT 2007


El 22/6/2007, a las 14:36, Tom Locke escribió:

> Easier to read:
>
> expected:
> "this is a very long string blah blah"
> got:
> "this is a very very long string blah blah"
> (using ==)
>
> Comments?

For me even easier to read would be:

expected: "this is a very long string blah blah"
got     : "this is a very very long string blah blah"
(using ==)

I'm inclined to think that this formatting should only be employed  
for strings over a certain length. Really short strings wouldn't  
benefit from it (eg. expected "foo", got "bar").

Cheers,
Wincent




More information about the rspec-users mailing list