title: How do I check if an API was called during a test
body: <p>I want our app to speak to our microservice for sending emails via an API.</p>
  
  <p>In tests (in RSpec), I want to say:</p>
  
  <ol>
  <li>Do something</li>
  <li>I expect the microservice to have been called / not been called.</li>
  </ol>
  
  <p>For example:</p>
  
  <ol>
  <li>Create a user</li>
  <li>I expect to have sent the welcome email.</li>
  </ol>