title: rspec receive method not working as expected
body: <p>I can't understand why the following code does not work in rspec when running my tests.</p>
  
  <pre><code>Lead.update_status(2,2,true)
  expect(Lead).to receive(:update_status).with(2, 2, true)
  </code></pre>
  
  <p>I have also tried</p>
  
  <pre><code>Lead.update_status(2,2,true)
  expect_any_instance_of(Lead).to receive(:update_status).with(2, 2, true)
  </code></pre>
  
  <p>The error I I get is</p>
  
  <pre><code>(&lt;Lead(id: integer, contact_id: integer, course_presentation_id: integer, status: integer, created_by_user_id: integer, updated_by_user_id: integer, created_at: datetime, updated_at: datetime, mailchimp_status: integer) (class)&gt;).update_status(2, 2, true)
             expected: 1 time with arguments: (2, 2, true)
             received: 0 times with arguments: (2, 2, true)
  </code></pre>
  
  <p>Note if I add puts "test" into my code this is prints out, so I know that update_status is actually working.</p>
  
  <p>Any ideas? Thanks.</p>