title: Why are emails not getting in the ActionMailer::Base.deliveries table?
body: <p>Currently in my development environment I am not seeing anything in the <code>ActionMailer::Base.deliveries</code> table after <code>mail</code> is used.  Is there a setting I am missing?</p>
  
  <p>config/environments/development.rb:<br> <code>config.action_mailer.delivery_method = :test</code>.</p>
  
  <p>app/mailers/notifier.rb</p>
  
  <pre><code>def send_email(user)
    mail(:to =&gt; user.email, :subject =&gt; "Welcome to our website!")
  end
  </code></pre>
  
  <p>These are the tests I'm running:<br></p>
  
  <pre><code>When /^I signup$/ do
    visit signup_path
    @user = FactoryGirl.build(:user)
    fill_in "user_email", :with =&gt; @user.email
    fill_in "user_password", :with =&gt; @user.password
    click_button "Join now"
  end
  
  Then /^I should receive a confirmation email$/ do
    email = ActionMailer::Base.deliveries.last
    email.subject.should == "Welcome to our website!"
  end
  </code></pre>
  
  <p>Right now I get the following error for the <code>I should receive a confirmation email</code> step:
  <code>undefined method subject for nil:NilClass (NoMethodError)</code></p>
  
  <p>Thanks!</p>