[rspec-users] raise_error suggestion

rogerdpack rogerpack2005 at gmail.com
Thu Apr 15 16:32:59 EDT 2010

> Be explicit about the error you expect to get:
> lambda { ... }.should raise_error(SomeErrorClass, /match the message/)
> Read the documentation athttp://rspec.rubyforge.org/rspec/1.3.0/classes/Spec/Matchers.html#M00...

Perhaps it should be changed so that if you don't pass a class it
outputs a warning.  That might be an acceptable option. (If not then I
still recommend my previous suggestion).

More information about the rspec-users mailing list