class RSpec::Mocks::OrderGroup

@private

def clear

def clear
  @ordering.clear
end

def consume

Other tags:
    Private: -
def consume
  @ordering.shift
end

def empty?

def empty?
  @ordering.empty?
end

def handle_order_constraint(expectation)

Other tags:
    Private: -
def handle_order_constraint(expectation)
  return unless @ordering.include?(expectation)
  return consume if ready_for?(expectation)
  expectation.raise_out_of_order_error
end

def initialize

def initialize
  @ordering = Array.new
end

def ready_for?(expectation)

Other tags:
    Private: -
def ready_for?(expectation)
  @ordering.first == expectation
end

def register(expectation)

Other tags:
    Private: -
def register(expectation)
  @ordering << expectation
end