fix raise_error() to catch all exceptions

This commit is contained in:
Laurent Sansonetti
2014-05-05 15:49:28 +08:00
parent 898e83233e
commit 91e857857e

View File

@@ -160,7 +160,7 @@ class Object
begin
obj.call
__assert__(!res, true, "Expected `#{klass}' to be raised, but nothing happened")
rescue => e
rescue Exception => e
__assert__(e.is_a?(klass), res, "Expected `#{klass}' to be raised, got `#{e}'")
end
end