matches?(given_proc) 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_error.rb, line 15
      def matches?(given_proc)
        @raised_expected_error = false
        @with_expected_message = false
        @eval_block = false
        @eval_block_passed = false
        begin
          given_proc.call
        rescue @expected_error => @actual_error
          @raised_expected_error = true
          @with_expected_message = verify_message
        rescue Exception => @actual_error
          # This clause should be empty, but rcov will not report it as covered
          # unless something (anything) is executed within the clause
          rcov_error_report = "http://eigenclass.org/hiki.rb?rcov-0.8.0"
        end

        unless negative_expectation?
          eval_block if @raised_expected_error && @with_expected_message && @block
        end
      ensure
        return (@raised_expected_error & @with_expected_message) ? (@eval_block ? @eval_block_passed : true) : false
      end
Register or log in to add new notes.