method
new
1.2.8 -
Show latest stable
-
0 notes -
Class: Spec::Matchers::RaiseError
- 1.1.4 (0)
- 1.1.12 (0)
- 1.2.0 (0)
- 1.2.8 (0)
- 1.3.0
- 1.3.1
- What's this?
new(expected_error_or_message=Exception, expected_message=nil, &block)
public
Hide source
# File lib/spec/matchers/raise_error.rb, line 4 def initialize(expected_error_or_message=Exception, expected_message=nil, &block) @block = block @actual_error = nil case expected_error_or_message when String, Regexp @expected_error, @expected_message = Exception, expected_error_or_message else @expected_error, @expected_message = expected_error_or_message, expected_message end end