Sha256: b507cf7e4fd59c2fc8bbab6d34a7f1043222b4405ad3cf581162be21d5113fe5
Contents?: true
Size: 664 Bytes
Versions: 57
Compression:
Stored size: 664 Bytes
Contents
module RSpec module Mocks class OrderGroup def initialize error_generator @error_generator = error_generator @ordering = Array.new end def register(expectation) @ordering << expectation end def ready_for?(expectation) return @ordering.first == expectation end def consume @ordering.shift end 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 end end end
Version data entries
57 entries across 57 versions & 6 rubygems