From: Raymond O'Connor Date: 2007-03-07T12:23:16+09:00 Subject: Mocha raise exception first call, return value second call Is there a way to have mocha raise an exception the first time an stub is called, and then return a value the second time it is called? First example, I'm trying to connect to a server and test the case where my first attempt raises a 'Server busy' exception or something of that sort. So I wait, then retry and then the second time the connection is successful. Cheers! Ray -- Posted via http://www.ruby-forum.com/.