title: Rails 4 sending emails in the "Test" environment
body: <p>Everytime I run tests, emails are actually sent. My <code>config/environments/test.rb</code> has this configuration</p>
  
  <pre><code>config.action_mailer.delivery_method = :test
  </code></pre>
  
  <p>So I thought that whenever I run test, they should not be <strong>really</strong> sent, but when I run the command</p>
  
  <pre><code>RAILS_ENV="test" rake test
  </code></pre>
  
  <p>The emails get sent either way. For a moment I thought that maybe I was not using the right environment. But then I deleted completely <code>db/test.sqlite3</code> and immediately after I run the tests again. The file was again restored, which proves that I am actually running in the <code>test</code> environment.</p>
  
  <p>What is going on? Why are my tests sending real mails? Could it have anything to do with the fact that I am using <code>deliver_now</code> on my app?</p>