title: Allow vs Stub, what's the difference?
body: <p>What is the difference between the following lines of (rspec) code and regardless if they are the same or different, when should you use one instead of the other?</p>
  
  <pre><code>book = double("book")
  allow(book).to receive(:title) { "The RSpec Book" }
  </code></pre>
  
  <p>versus</p>
  
  <pre><code>book = double("book")
  book.stub(:title).and_return("The RSpec Book")
  </code></pre>