From: Robert Dober Date: 2010-05-11T01:03:28+09:00 Subject: Re: Unit Test of method calling system() - how? On Mon, May 10, 2010 at 5:05 PM, Martin Hansen wrote: The basic idea is to intercept system, a very crude first approach is def reset $mysys = [] end def system *args $mysys << %x{#{args.join( " " )}} end then you can capture system calls outputs, you might want to add some code to capture exit values from system calls. I do not know how to do both out of my head, probably using a rescue cause. HTH R. > > > Martin > -- > Posted via http://www.ruby-forum.com/. > > -- The best way to predict the future is to invent it. -- Alan Kay