Sha256: 0611c13dcda0f6028d39d613f38249a9ddb1a4542b13aaf58624d8a3ccff5d98
Contents?: true
Size: 735 Bytes
Versions: 183
Compression:
Stored size: 735 Bytes
Contents
module RSpec module Mocks # @private class OrderGroup def initialize @ordering = Array.new end # @private def register(expectation) @ordering << expectation end # @private def ready_for?(expectation) @ordering.first == expectation end # @private def consume @ordering.shift end # @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 clear @ordering.clear end def empty? @ordering.empty? end end end end
Version data entries
183 entries across 132 versions & 25 rubygems