[rspec-users] specing rescue, ensure and else blocks of an Exception

Ashley Moran work at ashleymoran.me.uk
Fri Oct 26 08:00:24 EDT 2007

On 26 Oct 2007, at 12:56, Ashley Moran wrote:

>    @foo.should_receive(:update_attributes!).with(params
> [:foo]).and_raise(RecordNotSaved)

Sorry, RecordInvalid.new in your case, not RecordNotSaved (with or  
without the new)


blog @ http://aviewfromafar.net/
linked-in @ http://www.linkedin.com/in/ashleymoran
currently @ work

More information about the rspec-users mailing list