title: How to assert in MiniTest if method is sent to object that is NOT a mock?
body: <p>I understand that we can check if methods are sent to Mock objects using <code>expect</code>, but what about checking if methods are sent to objects that aren't Mocks, but actual objects in your app?</p>
  
  <p>Motivation: Sandi Metz' talk 'Magic Tricks of Testing' <a href="https://www.youtube.com/watch?v=URSWYvyc42M" rel="nofollow noreferrer">https://www.youtube.com/watch?v=URSWYvyc42M</a> says that for unit testing outgoing command method calls (explained in her talk), we should verify that the message is sent. I'm attempting to do so but the only thing I've found in MiniTest is <code>assert_send</code>, which has a few issues:</p>
  
  <ol>
  <li>It's deprecated.</li>
  <li>It doesn't take into account the value of the arguments sent to the receiving object. If I run <code>assert_send([object, :method_called, 'argument 1', 'argument 2'])</code>, the assertion will return true, even if <code>object</code> was expecting different strings than <code>'argument 1'</code> and <code>'argument 2'</code>.</li>
  </ol>
  
  <p>I've scoured the internet for the better part of 2 days on this. Anyone have any ideas?</p>