Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RSpec - should_raise method?

0 views
Skip to first unread message

Brian Takita

unread,
Dec 16, 2005, 2:26:00 PM12/16/05
to
Hello,

Does RSpec provide a way to check if an exception gets raised?
I would expect a method named should_raise, but I cant find it.

Something like the following should work in the specs, but a method should
be added.

should do
begin
call_method
false
rescue
true
end
end

--
Brian Takita
http://freeopinion.org

0 new messages