rubytddrspecautotestzentest

No colors when using autospec


When I'm using autospec to test a non-Rails Ruby project, I always have trouble getting my tests to show up red or green.

When I run a regular 'spec spec/ --color' command I get normal red/green responses. I've tried putting all sorts of commands in the .autotest file and I can't get that to work.

Also, in my Rails projects, I don't get this problem.

Note: I do have the ZenTest(4.2.1) and redgreen (1.2.2) gems installed. I'm currently trying to get it working with this project: http://github.com/coreyhaines/kata-number-to-led


Solution

  • Autospec reads a configuration file at spec/spec.opts for options. Make sure rspec can find this file and that it has the --color option (or --colour for our British friends).