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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to plataforma...@googlegroups.com
You can set delivery_method to :test in your config/environments/test.rb directly.