James Mead
2007-Feb-23 08:40 UTC
[mocha-developer] Fwd: Mocha test retry to connect up to 10 times
---------- Forwarded message ---------- From: Raymond O''connor <nappin713 at yahoo.com> Date: 23-Feb-2007 08:20 Subject: Re: Mocha test retry to connect up to 10 times To: ruby-talk ML <ruby-talk at ruby-lang.org> Hemant Kumar wrote:> On Fri, 2007-02-23 at 14:57 +0900, Raymond O''connor wrote: >> >> Any help would be greatly appreciated, thanks! >> > > With latest version of Mocha, you can actually do something like this: > > > TCPSocket.stubs(:open).returns(data1,data2,data3) > > where first call would return data1, second call data2 so on and so > forth. I hope, you can use this to your advantage.That worked perfectly! Thanks a ton! -- Posted via http://www.ruby-forum.com/. -- James. http://blog.floehopper.org