title: Rspec Testing Method That Retrieves Object from DB
body: <p>I am testing a method which takes a token that represents an object in the database, and retrieves it.</p>
  
  <p>I am trying to test that using rspec. How would I insert that object into the database first? I know I should be mocking it, but when I do, how would I then make that method access that mock as opposed to hit the database (as what it's written to do)?</p>