method
matches?

matches?(actual)
public
Hide source
# File lib/spec/matchers/be.rb, line 15 def matches?(actual) @actual = actual if handling_predicate? begin return @result = actual.__send__(predicate, *@args) rescue => predicate_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 # This supports should_exist > target.exists? in the old world. # We should consider deprecating that ability as in the new world # you can't write "should exist" unless you have your own custom matcher. begin return @result = actual.__send__(present_tense_predicate, *@args) rescue raise predicate_error end else return match_or_compare end end