class RSpec::Mocks::MethodDouble
def warn_if_nil_class
def warn_if_nil_class if proxy_for_nil_class? & RSpec::Mocks::Proxy.warn_about_expectations_on_nil Kernel.warn("An expectation of :#{@method_name} was set on nil. Called from #{caller[4]}. Use allow_message_expectations_on_nil to disable warnings.") end end