From: Eric Hodel Date: 2006-09-10T12:00:50+09:00 Subject: Re: Unit test an output with puts On Sep 9, 2006, at 12:38 PM, John Wilger wrote: > On 9/8/06, Eric Hodel wrote: >> Use util_capture from the ZenTest gem. You get two StringIO objects >> back from calling util_capture that hold the contents of $stdout and >> $stderr in the block: > >> out, err = util_capture do >> Foo.new.output >> end > > Nice. Does this also prevent the output from being dumped to the > console during the test? Yes. -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com