How do I get colour with Windows command prompt using RSpec in Ruby?

前端 未结 8 3113
迷失自我
迷失自我 2021-02-20 03:10

In other o/s RSpec returns nicely coloured results (red, green etc).

However in the windows (Vista) command prompt my text output is just plain old boring white.

8条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-20 04:05

    I'm running in Windows XP which I believe is an NT system. The ANSICON claims that this is not supported. Yes it does not work for cmd. But if you put the files in system32 folder, just run the ansicon.exe from anywhere. Win32Console is deprecated for rspec but you may still use it for other programs you write if you want color output from the command line. see the readmes in the gem. I put ansicon in my start>run>open text box. It works just fine.

提交回复
热议问题