views:

284

answers:

2

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

+4  A: 

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).

zetetic
A: 

I have it but I still do not get colors. Any ideas?

/usr/local/bin/ruby -rrubygems -e "require 'redgreen'"  -I.:lib:test -rubygems -e "[<files...>].each {|f| require f}" | /usr/local/lib/ruby/gems/1.8/gems/autotest-4.2.9/bin/unit_diff -u
ramonrails