class RSpec::Mocks::MessageExpectation

def ordered(&block)

api.should_receive(:finish).ordered
api.should_receive(:run).ordered
api.should_receive(:prepare).ordered

@example

Expect messages to be received in a specific order.
def ordered(&block)
  self.inner_implementation_action = block
  @ordered = true
  self
end