From: Pit Capitain Date: 2003-06-05T13:43:27+09:00 Subject: Re: Test::Unit::MockObject not working (like _I_ want it to) On 5 Jun 2003 at 9:02, Shashank Date wrote: > I should have made it clear (especially in the subject line) that > I ** know ** why it is raising the error. That much I expected. Sorry for telling you the obvious. > I just want to know, further, if there is any way to handle repetitions > like these. That is what I meant when I said earlier: > > > I thought I would be able to use it for calls in a loop. But that is not > > how it works. > > So it seems to me that CallOrder is limited to ** single ** execution of > the specified methods in that order. I'm still not sure what you want. Do you simply want to run the specified methods in a loop like you showed in your example? Then you could specify the call order like tmObj.setCallOrder(*[:on, :off]*2) but this again seems too obvious to me, so I'm sure I'm still missing something. Regards, Pit