Panasonic Youth rob sanheim writes about software, business, ruby, music, stuff and things



Posted
24 July 2007 @ 11pm

Tagged
Rails, Ruby, TDD

Discuss

Did redgreen get borked?

I recently had to reinstall all my favorite gems and tools on a powerbook, and desired colored test goodness. So after bringing in redgreen and zentest gems, amongst others, I saw the following:


rob@fixx:~/src/relevance/pharminst/trunk$ rake|redgreen
-bash: redgreen: command not found
^Crake aborted!

rob@fixx:~/src/relevance/pharminst/trunk$ rake|rg
/opt/local/lib/ruby/gems/1.8/gems/redgreen-1.2.2/bin/rg:6: can't convert nil into String (TypeError)
        from /opt/local/bin/rg:16:in `load'
        from /opt/local/bin/rg:16
^Crake aborted!

On looking at the code, I see that the command line filter was renamed to ‘rg’, only now it just throws that error see above if i filter a test run through it. Doing a ‘require redgreen’ in my autotest file (.autotest) still works, sort of, as its just the seperator bar that gets colored and not the actual assertion line.

Did I mess something up on install, or has anyone else noticed this?


3 Comments

Posted by
gordon thiesfeld
25 July 2007 @ 10am

Try this in your .autotest file

require ‘redgreen/autotest’


Posted by
Rob
26 July 2007 @ 10am

Thanks gordon, that at least fixes autotest. Now to figure out how to run a standard rake task through it..


Posted by
Chris
26 July 2007 @ 2pm

The ‘redgreen’ gem can be used with rake by putting a “require ‘redgreen’” in your test_helper.rb. This also causes it to work with single *_test.rb files. Assuming Rails, of course. Otherwise you can us the ‘rg’ runner — $ rg my_test_file.rb


Leave a Comment

Make Textmate’s “find in project” faster in Rails projects Finally, a new theme and dropping the www