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

前端 未结 8 3166
迷失自我
迷失自我 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:07

    Did you specify '--color' in your rake rspec tasks' spec_opts? Something like this..

      Spec::Rake::SpecTask.new(:your_task_name) do |t|
        t.spec_opts = ["--color"]
        t.spec_files = [] # List of spec files
      end
    

提交回复
热议问题