class RSpec::Mocks::Proxy

def check_for_unexpected_arguments(expectation)

Other tags:
    Private: -
def check_for_unexpected_arguments(expectation)
  return if @messages_received.empty?
  return if @messages_received.any? { |method_name, args, _| expectation.matches?(method_name, *args) }
  name_but_not_args, others = @messages_received.partition do |(method_name, args, _)|
    expectation.matches_name_but_not_args(method_name, *args)
  end
  return if name_but_not_args.empty? && !others.empty?
  expectation.raise_unexpected_message_args_error(name_but_not_args.map { |args| args[1] })
end