Method: MotionSpec::Matcher::RaiseError#initialize

Defined in:
lib/motion-spec/matcher/raise_error.rb

#initialize(error_class = Exception, message = '') ⇒ RaiseError

Returns a new instance of RaiseError.



5
6
7
8
# File 'lib/motion-spec/matcher/raise_error.rb', line 5

def initialize(error_class = Exception, message = '')
  @error_class = error_class.is_a?(Class) ? error_class : Exception
  @error_message = exception_matcher?(error_class) ? error_class : message
end