[rspec-users] no should raise_exception
rogerdpack
rogerpack2005 at gmail.com
Mon Dec 28 15:08:19 EST 2009
> What I really want to say is "should raise(Blah)" but Ruby already defines
> raise as a keyword :)
>
> I'd be open to aliasing raise_error with raise_exception, renaming it to
> raise_exception and aliasing raise_error for compatibility, but I think this
> might just add confusion rather than clarifying intent. Thoughts?
(obviously) I like raise_exception
The only drawback would be that I suppose in keeping with the new name
it "could" be redefined to catch Exception by default, if it currently
catches StandardError(?)
raise_error seems less readable to me, as there is no Error class.
Having both would be fine by me, too.
Happy holidays.
-r
More information about the rspec-users
mailing list