# File lib/spec/matchers/matcher.rb, line 27 def matches?(actual) @actual = actual if @expected_exception begin instance_exec(actual, &@match_block) true rescue @expected_exception false end else begin instance_exec(actual, &@match_block) rescue Spec::Expectations::ExpectationNotMetError false end end end