def yields(*items)
      @options[:suppress_arguments_to_block] = true
      if items.empty?
        # Yield once
        @options[:block] = lambda do |block|
          if block.arity != 0 and block.arity != -1
            raise ExpectationError.new("The given block was expected to have no parameter count; instead, got #{block.arity} to <#{to_s}>")
          end
          block.call
        end
      else
        # Yield one or more specific items
        @options[:block] = lambda do |block|
          items.each do |item|
            if item.kind_of?(Array) 
              if block.arity == item.size
                # Unfold the array into the block's arguments:
                block.call *item
              elsif block.arity == 1
                # Just pass the array in
                block.call item
              else
                # Size mismatch
                raise ExpectationError.new("Can't pass #{item.inspect} to block with arity #{block.arity} to <#{to_s}>")
              end
            else
              if block.arity != 1
                # Size mismatch
                raise ExpectationError.new("Can't pass #{item.inspect} to block with arity #{block.arity} to <#{to_s}>")
              end
              block.call item
            end
          end
        end
      end
      self
    end
def yields(*items)
      @options[:suppress_arguments_to_block] = true
      if items.empty?
        # Yield once
        @options[:block] = lambda do |block|
          if block.arity != 0 and block.arity != -1
            raise ExpectationError.new("The given block was expected to have no parameter count; instead, got #{block.arity} to <#{to_s}>")
          end
          block.call
        end
      else
        # Yield one or more specific items
        @options[:block] = lambda do |block|
          items.each do |item|
            if item.kind_of?(Array) 
              if block.arity == item.size
                # Unfold the array into the block's arguments:
                block.call *item
              elsif block.arity == 1
                # Just pass the array in
                block.call item
              else
                # Size mismatch
                raise ExpectationError.new("Can't pass #{item.inspect} to block with arity #{block.arity} to <#{to_s}>")
              end
            else
              if block.arity != 1
                # Size mismatch
                raise ExpectationError.new("Can't pass #{item.inspect} to block with arity #{block.arity} to <#{to_s}>")
              end
              block.call item
            end
          end
        end
      end
      self
    end
Used when an expected method accepts a block at runtime.
 When the expected method is invoked, the block passed to
 that method will be invoked as well.

 NOTE: ExpectationError will be thrown upon running the expected method
 if the arguments you set up in +yields+ do not properly match up with
 the actual block that ends up getting passed.

 == Examples
 <b>Single invocation</b>: The block passed to +lock_down+ gets invoked
 once with no arguments:

   @safe_zone.expects.lock_down.yields

   # (works on code that looks like:)
   @safe_zone.lock_down do
     # ... this block invoked once
   end

 <b>Multi-parameter blocks:</b> The block passed to +each_item+ gets
 invoked twice, with <tt>:item1</tt> the first time, and with
 <tt>:item2</tt> the second time:

   @fruit_basket.expects.each_with_index.yields [:apple,1], [:orange,2]

   # (works on code that looks like:)
   @fruit_basket.each_with_index do |fruit,index|
     # ... this block invoked with fruit=:apple, index=1,
     # ... and then with fruit=:orange, index=2
   end

 <b>Arrays can be passed as arguments too</b>... if the block
 takes a single argument and you want to pass a series of arrays into it,
 that will work as well:

   @list_provider.expects.each_list.yields [1,2,3], [4,5,6]

   # (works on code that looks like:)
   @list_provider.each_list do |list|
     # ... list is [1,2,3] the first time
     # ... list is [4,5,6] the second time
   end

 <b>Return value</b>: You can set the return value for the method that
 accepts the block like so:

   @cruncher.expects.do_things.yields(:bean1,:bean2).returns("The Results")

 <b>Raising errors</b>: You can set the raised exception for the method that
 accepts the block. NOTE: the error will be raised _after_ the block has
 been invoked.

   # :bean1 and :bean2 will be passed to the block, then an error is raised:
   @cruncher.expects.do_things.yields(:bean1,:bean2).raises("Too crunchy")