raise_error already catches any type of exception, error or not: class BlahException < Exception; end class BlahError < StandardError; end
lambda { raise BlahException }.should raise_error(BlahException) lambda { raise BlahError }.should raise_error(BlahError) lambda { raise "blah" }.should raise_error(RuntimeError, "blah") -- Elliot On Sat, Dec 19, 2009 at 11:12 PM, rogerdpack <rogerpack2...@gmail.com> wrote: > > I know there's a raise_error > however...exceptions are not always errors, so I had expected a > raise_exception matcher...would this be a reasonable addition (I'd be > happy to do it). > Thanks. > -r > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users