class RSpec::Mocks::ProxyForNil

def warn_or_raise!(method_name)

def warn_or_raise!(method_name)
  # This method intentionally swallows the message when
  # neither disallow_expectations nor warn_about_expectations
  # are set to true.
  if disallow_expectations
    raise_error(method_name)
  elsif warn_about_expectations
    warn(method_name)
  end
end