method

new

Importance_0
RSpec latest stable (1.3.1) - 0 notes - Class: Spec::Matchers::RaiseException
new(expected_exception_or_message=Exception, expected_message=nil, &block) public

No documentation

This method has no description. You can help the RSpec community by adding new notes.

Hide source
# File lib/spec/matchers/raise_exception.rb, line 4
      def initialize(expected_exception_or_message=Exception, expected_message=nil, &block)
        @block = block
        @actual_exception = nil
        case expected_exception_or_message
        when String, Regexp
          @expected_exception, @expected_message = Exception, expected_exception_or_message
        else
          @expected_exception, @expected_message = expected_exception_or_message, expected_message
        end
      end
Register or log in to add new notes.