title: Rails / RSpec: 'allow_any_instance_of' doesn't return multiple values
body: <p>I have this code in one of my tests:</p>
  
  <pre><code>it 'returns ids when successful' do
    allow_any_instance_of(Importer).to receive(:import).and_return('12589', '12590', '12591', '12592', '12593', '12594')
  
    expect(@dispatcher.run).to eq(['12589', '12590', '12591', '12592', '12593', '12594'])
  end
  </code></pre>
  
  <p>The test fails because it only return the first value:</p>
  
  <pre><code>expected: ["12589", "12590", "12591", "12592", "12593", "12594"]
  got:      ["12589", "12589", "12589", "12589", "12589", "12589"]
  </code></pre>
  
  <p>I just saw that <code>#and_return</code>'s capability of returning multiple values only works when used with <code>#allow</code>. </p>
  
  <p>What can I do for <code>#allow_any_instance_of</code> to get this behaviour?</p>
  
  <p>EDIT:</p>
  
  <p>The class I am testing is called <code>Dispatcher</code>. It takes an xml file, and splits it into parts concerning exactly one object. Each of those splitted parts is taken by the <code>Importer</code> which returns exactly one ID. The <code>Dispatcher</code> then creates an Array from those Ids. So, no, I am not expecting an array to be returned by the Importer.</p>