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



Posted
5 February 2008 @ 12am

Tagged
BDD, Rails, Ruby, TDD

Discuss

autotest without the unit_diff

Ever since getting ZenTest 3.9.1, it seems unit-diff is always turned on. That means your output in autotest is noiser, and I prefer the normal output from my spec or test framework. Anyways, I'm not sure what changed since earlier versions of autotest (maybe the rails command used to override the command string?), but here is a simple diff at pastie to allow you to turn off unit-diff. Also submitted to the rubyforge project.

You need to apply the above patch to allow you to conditionally pipe to unit_diff, otherwise the below config tweak will break autotest.

Once you have hacked your autotest.rb with that patch, then you can open your .autotest (either in your home folder or in a specific project), and do the following:

Autotest.add_hook :initialize do |at|
  at.unit_diff = nil
end

See David's helpful post for more on autotest configs and tweaking.


2 Comments

Posted by
Ryan Davis
5 February 2008 @ 6pm

unit_diff has _always_ been on.

There is no need to patch autotest, just set unit_diff = ‘cat’.

P.S. your code sample munged add\_hook.


Posted by
Rob
6 February 2008 @ 10pm

Thanks Ryan, that is definitely a more straightforward to do this.


Leave a Comment

multi_rails 0.0.5 released Beware the default nginx config - old IE6 hates gzip