views:

882

answers:

1

I'd like to do something like this:

some_method.should_raise <any kind of exception, I don't care>

How should I do this?

some_method.should_raise exception

... doesn't work.

+14  A: 
lambda { some_method }.should raise_error

See the doumentation for more.

Avdi
thanks, it works fine now!
marcgg