method

new

rspec latest stable - Class: Spec::Matchers::RaiseError

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (1.2.8) is shown here.

new(expected_error_or_message=Exception, expected_message=nil, &block)
public

No documentation available.

# 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