Sha256: e804d9e0a12fdd8f784352799655408ccd229727d5d6b1854bbfd1afea73b5ec
Contents?: true
Size: 592 Bytes
Versions: 61
Compression:
Stored size: 592 Bytes
Contents
require 'mocha/no_yields' require 'mocha/single_yield' require 'mocha/multiple_yields' module Mocha class YieldParameters def initialize @parameter_groups = [] end def next_invocation case @parameter_groups.length when 0 then NoYields.new when 1 then @parameter_groups.first else @parameter_groups.shift end end def add(*parameters) @parameter_groups << SingleYield.new(*parameters) end def multiple_add(*parameter_groups) @parameter_groups << MultipleYields.new(*parameter_groups) end end end
Version data entries
61 entries across 50 versions & 5 rubygems