Jeremy Stell-Smith
2007-Sep-08 18:39 UTC
[rspec-users] why no newlines in failure messages?
Instead of : expected "<ul>\n <li>red</li>\n <li>blue</li>\n</ul>", got "<ul>\n <li>red</li>\n <li>blue</li>\n </ul>" (using ==) could we make rspec exceptions look more like : expected "<ul>\n <li>red</li>\n <li>blue</li>\n</ul>", got "<ul>\n <li>red</li>\n <li>blue</li>\n </ul>" (using ==) or if that is too hard, even : expected "<ul>\n <li>red</li>\n <li>blue</li>\n</ul>", got "<ul>\n <li>red</li>\n <li>blue</li>\n </ul>" (using ==) then it becomes readily easy to scan the two values and see differences, as opposed to (something I have done far too often in the last few months) copying the diff, pasting it somewhere and manually doing this. I have looked at the --diff option, but it doesn''t show how something has changed, just where it has changed which is not quite what I want. Jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070908/557cc9fe/attachment-0001.html
On 9/8/07, Jeremy Stell-Smith <jeremystellsmith at gmail.com> wrote:> Instead of : > > expected "<ul>\n <li>red</li>\n <li>blue</li>\n</ul>", got "<ul>\n > <li>red</li>\n <li>blue</li>\n </ul>" (using ==) > > could we make rspec exceptions look more like : > > expected "<ul>\n <li>red</li>\n <li>blue</li>\n</ul>", > got "<ul>\n <li>red</li>\n <li>blue</li>\n </ul>" (using ==)Trunk''s already doing this. Not released yet.> > or if that is too hard, even : > > expected > "<ul>\n <li>red</li>\n <li>blue</li>\n</ul>", got > "<ul>\n <li>red</li>\n <li>blue</li>\n </ul>" (using ==) > > then it becomes readily easy to scan the two values and see differences, as > opposed to (something I have done far too often in the last few months) > copying the diff, pasting it somewhere and manually doing this. > > I have looked at the --diff option, but it doesn''t show how something has > changed, just where it has changed which is not quite what I want. > > Jeremy > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >