title: How to say "any_instance" "should_receive" any number of times in RSpec
body: <p>I've got an import controller in rails that imports several csv files with multiple records into my database. I would like to test in RSpec if the records are actually saved by using RSpec:</p>
  
  <pre><code>&lt;Model&gt;.any_instance.should_receive(:save).at_least(:once)
  </code></pre>
  
  <p>However i get the error saying:</p>
  
  <pre><code>The message 'save' was received by &lt;model instance&gt; but has already been received by &lt;another model instance&gt;
  </code></pre>
  
  <p>A contrived example of the controller:</p>
  
  <pre><code>rows = CSV.parse(uploaded_file.tempfile, col_sep: "|")
  
    ActiveRecord::Base.transaction do
      rows.each do |row| 
      mutation = Mutation.new
      row.each_with_index do |value, index| 
        Mutation.send("#{attribute_order[index]}=", value)
      end
    mutation.save          
  end
  </code></pre>
  
  <p>Is it possible to test this using RSpec or is there any workaround?</p>