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.
You need to install the win32console
gem. BTW: which version of RSpec are you using? Every single version of RSpec I have ever used, actually prints out
You must 'gem install win32console' to use colour on Windows
when you try to colorize output.
The best method is to create a file name .rspec in the root folder of your app and include this single line of code in it:
--colour
Done and dusted
UPDATE: Win32Console no longer works with rspec. ANSICON recommended. https://github.com/rspec/rspec-rails/issues/487#issuecomment-3556806
I had to install ansicon, and now everything is fine. (Even in my Aptana terminal).
Install ansicon description: http://qastuffs.blogspot.com/2011/02/how-to-install-ansicon-for-cucumber-to.html
I had this issue. I've been unable to get ansicon to work, as it crashes when running from cmd.
To fix I added the Win32console gem to my gem file and then ran bundle update.
**As an update: Put the gem in the test group of your gemfile:
group :test do
gem 'rails-controller-testing', '1.0.2'
gem 'minitest-reporters', '1.1.14'
gem 'guard', '2.13.0'
gem 'guard-minitest', '2.4.4'
gem 'win32console'
end
This will prevent errors when pushing to heroku
Cheers!
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.