Re: [rspec-users] Failing to raise an exception in a stub

2007-09-13 Thread Jarkko Laine
On 13.9.2007, at 23.29, aslak hellesoy wrote: On 9/13/07, Jarkko Laine <[EMAIL PROTECTED]> wrote: I've come across rather strange behaviour when trying to raise an exception in a stubbed method. I'm speccing the behaviour of a Rails create action, where I'm using save! to catch failed saves. I

Re: [rspec-users] Failing to raise an exception in a stub

2007-09-13 Thread aslak hellesoy
On 9/13/07, Jarkko Laine <[EMAIL PROTECTED]> wrote: > I've come across rather strange behaviour when trying to raise an > exception in a stubbed method. > > I'm speccing the behaviour of a Rails create action, where I'm using > save! to catch failed saves. In the case of working save, I'm using > t

[rspec-users] Failing to raise an exception in a stub

2007-09-13 Thread Jarkko Laine
I've come across rather strange behaviour when trying to raise an exception in a stubbed method. I'm speccing the behaviour of a Rails create action, where I'm using save! to catch failed saves. In the case of working save, I'm using the following stub: @client.stub!(:save!).and_retur