From: Phlip Date: 2006-09-09T07:05:12+09:00 Subject: Re: Unit test an output with puts Eric Boucher wrote: > I want to be able to unit/test an output with the method 'puts'. Here's > a small example of what I'm trying to achieve: puts is a convenience function. It's really $stdout.write() etc. So use fileHandle.write(), and then pass in a handle to an IO-stream, or a temporary file, into your routine. Yes, that means you pass more crap around. Unit testing powerfully decouples your code, such that you no longer couple even with convenience objects like $stdout. -- Phlip http://www.greencheese.us/ZeekLand <-- NOT a blog!!!