Friday, June 8, 2012

RSpec Color Output in Windows

As part of the Rails Tutorial I'm moving through, RSpec is introduced as an alternative to the standard Rails test framework. RSpec tests can be run directly from a windows command prompt and it will deliver nicely formatted output, making it easy to spot test failures. Except, the first time through, this is what I got -

Feh. Mostly unreadable.

Then I found this little gem - Ansicon - which provides proper handling of ANSI escape sequences on windows machines. Follow these steps:

  1. Download the most recent package (v1.52 at the time of this writing)
  2. Unzip somewhere convenient
  3. Via a command prompt, navigate to the directory and run "ansicon.exe -i" to install
Running the same test again now yields - 

Much prettier.

No comments:

Post a Comment