class Rspec::Mocks::OrderGroup

def consume

def consume
  @ordering.shift
end

def handle_order_constraint expectation

def handle_order_constraint expectation
  return unless @ordering.include? expectation
  return consume if ready_for?(expectation)
  @error_generator.raise_out_of_order_error expectation.sym
end

def initialize error_generator

def initialize error_generator
  @error_generator = error_generator
  @ordering = Array.new
end

def ready_for?(expectation)

def ready_for?(expectation)
  return @ordering.first == expectation
end

def register(expectation)

def register(expectation)
  @ordering << expectation
end