Sha256: 36e47bd31a0aa56d51f761dff55392ccc31d3326df2b4a41f7ae32862cdbe93a
Contents?: true
Size: 664 Bytes
Versions: 18
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
18 entries across 18 versions & 1 rubygems