如何在Ruby中使用RSpec在Windows命令提示符下获取颜色? [英] How do I get colour with Windows command prompt using RSpec in Ruby?
本文介绍了如何在Ruby中使用RSpec在Windows命令提示符下获取颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在其他操作系统中,RSpec返回彩色效果很好的颜色(红色,绿色等)。
In other o/s RSpec returns nicely coloured results (red, green etc).
但是在Windows(Vista)命令提示符下,我的文本输出只是普通的
However in the windows (Vista) command prompt my text output is just plain old boring white.
如何为我的RSpec测试结果带来色彩?
How can I bring colour to my RSpec test results?
谢谢
进化
推荐答案
更新:
Win32Console不再适用于rspec。推荐使用ANSICON。
https://github.com/rspec/rspec-rails/issues/487# issuecomment-3556806
这篇关于如何在Ruby中使用RSpec在Windows命令提示符下获取颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文