[rspec-users] Nicer failure message formatting

David Chelimsky dchelimsky at gmail.com
Fri Jun 22 10:11:26 EDT 2007


On 6/22/07, Wincent Colaiuta <win at wincent.com> wrote:
> 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").

Do we really want to try and make it that smart? What would that
length be? I think this is asking for trouble.

>
> Cheers,
> Wincent
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list