[mocha-developer] Fwd: Mocha test retry to connect up to 10 times

James Mead jamesmead44 at gmail.com
Fri Feb 23 03:40:38 EST 2007

---------- 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/.


More information about the mocha-developer mailing list