class RSpec::Matchers::BuiltIn::Has
def matches?(actual)
def matches?(actual) method = predicate if is_private_on?(actual) RSpec.deprecate "matching with #{@expected} on private method #{predicate}", :replacement => "`expect(object.send(#{predicate.inspect})).to be_true` or change the method's visibility to public" end result = actual.__send__(method, *@args) check_respond_to(actual, method) result end