class RSpec::Mocks::AnyInstance::PositiveExpectationChain

@api private

def create_message_expectation_on(instance)

def create_message_expectation_on(instance)
  proxy = ::RSpec::Mocks.proxy_for(instance)
  expected_from = IGNORED_BACKTRACE_LINE
  me = proxy.add_message_expectation(expected_from, *@expectation_args, &@expectation_block)
  if RSpec::Mocks.configuration.yield_receiver_to_any_instance_implementation_blocks?
    me.and_yield_receiver_to_implementation
  end
  me
end

def invocation_order

def invocation_order
  @invocation_order ||= {
    :with => [nil],
    :and_return => [:with, nil],
    :and_raise => [:with, nil]
  }
end