[rspec-users] Color output in pagers

Paul Hinze
2009-12-02T20:38:13Z

P. A. <lists at ruby-forum.com> on 2009-12-02 at
10:13:
> $ cucumber #=> color output
> $ cucumber | less -R #=> monochrome

Ah now I see what you''re saying.  We''re getting burned by this
line:

http://github.com/aslakhellesoy/cucumber/blob/master/lib/cucumber/formatter/ansicolor.rb#L20
> Term::ANSIColor.coloring = false if !STDOUT.tty? and not
ENV.has_key?("AUTOTEST")

So, we can either feature request an override variable for this line, or
perhaps there is a way to trick a program that STDOUT is actually a tty...?

Paul