[rspec-users] Exception handling

Marcos Chicote totochicote at gmail.com
Wed Jun 30 09:45:40 EDT 2010

I'm new in Rspec and I would like to ask a question.
Suppose I have a test that fails raising an exception. I do not want the
test to raise an exception and I'm not expecting one, but something fails
and an exception occurs.
Is there some way to handle that exception and do something in that case?

I was thinking of some way of checking that a test failed in
*after(:each)*method and handle the error there (I want to clear some
variables and
re-start others).

Is that possible?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20100630/11b5fa66/attachment.html>

More information about the rspec-users mailing list