Devise.mailer in test environment is it the correct way ?

28 views
Skip to first unread message

kadoudal

unread,
May 22, 2012, 10:46:22 AM5/22/12
to Devise
I am using Devise.mailer as my default mailer ...
In test environment , I got an error :
Errno::ECONNREFUSED: Connection refused - connect(2)
on deliver

so I added the following in my config/environ
config.after_initialize do
Devise.mailer.delivery_method = :test
end

and it seems to work fine ...
Is it the correct way to handle it in test environment ?

thanks

Carlos Antonio da Silva

unread,
May 22, 2012, 10:53:56 AM5/22/12
to plataforma...@googlegroups.com
You can set delivery_method to :test in your config/environments/test.rb directly.

-- 
At.
Carlos Antonio

Reply all
Reply to author
Forward
0 new messages