[rspec-users] customize output of script/spec?
elliot.winkler at gmail.com
Sat May 22 16:22:46 EDT 2010
I don't think RSpec has a built-in way to customize that. I think you'll
just have to override the matcher you're using. Clone the git repo (or, `gem
install open_gem` and then `gem open rspec`) and take a look at the
spec/matchers/* directory for more (note that `.should ==`, `.should_not ==`
is OperatorMatcher and not EqualMatcher).
As for detecting the differences, you could check out one of these solutions
, and then use the ansi-termcolor or colored gems to colorize the
On Sat, May 22, 2010 at 11:47 AM, Patrick J. Collins <
patrick at collinatorstudios.com> wrote:
> I am just curious-- is there any way to customize the output of the
> "got" that is returned?
> I often find myself comparing big blocks of text that are virtually
> except one minor detail (like a missing letter somewhere), and it's quite
> to tell what is different between the expected and got..
> Is there perhaps a way to make it so that the actual differences have a
> different foreground or background color in the terminal?
> Patrick J. Collins
> rspec-users mailing list
> rspec-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users