title: how to yield different values for different calls with rspec
body: <p>i am trying to use <code>and_yield</code> the same way that <code>and_return</code> works.  i want it to yield ONE value each time its called... however it yields TWICE each time its called.</p>
  
  <p>this contrived example shows the issue</p>
  
  <pre><code>class Yielder
    @@blocks = []
    def self.yielder; end
    def self.blocks= b; @@blocks &lt;&lt; b; end
    def self.blocks; @@blocks; end
  end
  
  describe Yielder do
    it 'should yield twice' do
      allow(Yielder).to receive(:yielder).and_yield(:foo).and_yield(:bar)
  
      2.times do
        Yielder.yielder do |y|
          Yielder.blocks = y
        end
      end
  
      expect(Yielder).to have_received(:yielder).twice
      expect(Yielder.blocks).to eq [:foo, :bar]
    end
  end
  </code></pre>
  
  <p>rspec results...</p>
  
  <pre><code>       expected: [:foo, :bar]
              got: [:foo, :bar, :foo, :bar]
  </code></pre>
  
  <p>am i using this incorrectly?</p>