method
new
1.1.4 -
Show latest stable
- Class:
Spec::Matchers::RaiseError
new(error_or_message=Exception, message=nil, &block)public
No documentation available.
# File lib/spec/matchers/raise_error.rb, line 4
def initialize(error_or_message=Exception, message=nil, &block)
@block = block
case error_or_message
when String, Regexp
@expected_error, @expected_message = Exception, error_or_message
else
@expected_error, @expected_message = error_or_message, message
end
end