selenium - Email delivery testing with email_spec breaks on Rails 3.0.11 -> 3.1.3 -
selenium - Email delivery testing with email_spec breaks on Rails 3.0.11 -> 3.1.3 -
i'm in process of migrating rails 3.0.11 app 3.1.3. , somehow, breaks email_spec testing amount of emails received when using cucumber + selenium setup.
config.action_mailer.delivery_method = :test
, have tried :cache
, :file
delivery methods. no matter what, actionmailer::base.deliveries
empty, tho according logs, emails sent. , dropping downwards to rails 3.0.11 makes work again.
edit: specific versions, here gemfile.lock (note spork not used cucumber features).
clues, anyone?
try setting:
actionmailer::base.delivery_method = :test actionmailer::base.perform_deliveries = true actionmailer::base.deliveries.clear
in features/support/env.rb
or more it's bug somewhere, here can see people similar problems: https://github.com/bmabey/email-spec/issues?sort=created&direction=desc&state=open&page=1
keep eye out not send real emails reason (bugs, etc.)
delivery_method
- defines delivery method. possible values :smtp (default), :sendmail, :test, , :file. or may provide custom delivery method object eg. myowndeliverymethodclass.new. see mail service gem documentation on interface need implement custom delivery agent.
perform_deliveries
- determines whether emails sent action mailer when phone call .deliver on mail service message or on action mailer method. on default can turned off aid in functional testing.
deliveries
- keeps array of emails sent out through action mailer delivery_method :test. useful unit , functional testing.
ruby-on-rails selenium cucumber email-spec
Comments
Post a Comment