class RSpec::Mocks::OrderGroup
@private
def clear
def clear @ordering.clear end
def consume
- Private: -
def consume @ordering.shift end
def empty?
def empty? @ordering.empty? end
def handle_order_constraint(expectation)
- 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)
- Private: -
def ready_for?(expectation) @ordering.first == expectation end
def register(expectation)
- Private: -
def register(expectation) @ordering << expectation end