[rspec-users] how do i get color with autotest on XP?

Luis Lavena luislavena at gmail.com
Fri Feb 29 20:08:51 EST 2008

On Fri, Feb 29, 2008 at 9:15 PM, Spencer Roan <lists at ruby-forum.com> wrote:
> when i run "rake spec" i get color, if have --colour in spec.opts.
>  when i run autotest the output isn't displayed(i can tell the tests have
>  run thanks to snarl), unless i get rid of --colour. however, now the
>  output is plain-jane white!
>  adding require 'autotest/redgreen' to .autotest seems to have no effect.
>  when i run "ruby -S script/spec -O spec/spec.opts
>  spec/models/user_spec.rb(which is what is echoed when i run autotest), i
>  also get color only if --colour is in spec.opts
>  any thoughts would be appreciated

For the Windows console process and display correctly the color,
special care should be taken from the normal ANSi escape code and
redirected to some Win32API functions.

Doing that, autotest is no longer capable of capturing the
STDOUT/STDERR of the child process and thus, not displaying the

I'm aware that win32console author is working on workaround this
limitation, but no other news.

Luis Lavena
Multimedia systems
A common mistake that people make when trying to design
something completely foolproof is to underestimate
the ingenuity of complete fools.
Douglas Adams

More information about the rspec-users mailing list