title: How to test email sending using Rspec?
body: <p>What are the best practices and tools to test email-sending using rspec with Rails? </p>
  
  <p>For instance, how do I test that an email has been sent or what should I test to have efficient testing and acceptable coverage.</p>
  
  <p>If you guys need an example, how would I go and test this:</p>
  
  <pre><code>class UserMailer &lt; ActionMailer::Base
  
   def jobdesc_has_been_reviewed(user, title)
      @body[:title]  = title
      @body[:jobdesc]  = jobdesc
      @body[:url]  = "http://" + user.account.subdomain + "." + Constants::SITE_URL + "/jobdescs/#{jobdesc.id}"
   end
  
  end
  </code></pre>