class RSpec::Matchers::BuiltIn::Has

def check_respond_to(actual, method)

def check_respond_to(actual, method)
  RSpec.deprecate(
    "Matching with #{@expected} on an object that doesn't respond to `#{method}`",
    :replacement => "`respond_to_missing?` or `respond_to?` on your object"
  ) unless actual.respond_to?(method)
end