title: RSpec: Test Scope Eager Loading
body: <p>One of my models' default scope is set to automatically load a related model with <code>includes()</code>.  How can I test this functionality with RSpec?  I tried running:</p>
  
  <pre><code>Model.includes(:relation).to_sql
  </code></pre>
  
  <p>Hoping I could detect the signature in the SQL, but it only returned this:</p>
  
  <pre><code>SELECT "models".* FROM "models"
  </code></pre>
  
  <p>No mention of the relation, it's apparently done with a second query.  How would you recommend testin this?</p>