bmabey/email-spec — Issue #82: Rails + Cucumber + email_spec - keeps sending real emails
Author: mczenko
Created: 2011-11-23 22:18:55+00:00
State: open

Cucumber keeps sending e-mails for real. Rails.env prints it is in "test" environment, but the messages are being sent. email_spec does not see them, which is probably normal in such a case.

I tried setting config.action_mailer.delivery_method to either :test and :cache. No difference. If I am using standard Rails testing (ActionMailer::TestCase), everything works perfectly fine. Did anyone experience this problem ?

The only thing I changed wrt to the originals is the action_mailer_cache_delivery.rb where I changed:

DELIVERIES_CACHE_PATH =
File.join(RAILS_ROOT,'tmp','cache','action_mailer_cache_deliveries.cache')

to be:

DELIVERIES_CACHE_PATH =
File.join(Rails.root,'tmp','cache','action_mailer_cache_deliveries.cache').

Did anyone experience this problem ?