Cucumber step failing for Devise, connection refused? -


i'm trying cucumber tests working devise, , have following step definition:

given /^(?:i am|i have|i) signed (?:as|with) "(.*)\/(.*)"$/ |email, password|   factory(:user, :email => email, :password => password, :password_confirmation => password) end 

and user factory:

factory.define :user |u|   u.sequence(:email) { |n| "testing@example#{n}.com" }   u.password "test_pass"   u.password_confirmation "test_pass"   u.sequence(:display_name) { |n| "user#{n}" }   u.people { |i| [i.association(:person), i.association(:person)] } end 

and have these devise modules loaded (in app/models/user.rb):

# include devise modules devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :token_authenticatable, :confirmable, :lockable, :timeoutable 

i run cucumber scenario above step, , fails with:

given signed in "a_new_user@example.com/test_password" # features/step_definitions/devise_steps.rb:7   connection refused - connect(2) (errno::econnrefused)   /users/macbook/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/smtp.rb:551:in `initialize'   /users/macbook/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/smtp.rb:551:in `open'   /users/macbook/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/smtp.rb:551:in `block in do_start'   /users/macbook/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/timeout.rb:57:in `timeout'   /users/macbook/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/timeout.rb:87:in `timeout'   /users/macbook/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/smtp.rb:551:in `do_start'   /users/macbook/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/smtp.rb:525:in `start'   ./features/step_definitions/devise_steps.rb:4:in `/^(?:i am|i have|i) signed (?:as|with) "(.*)\/(.*)"$/'   features/users/friends.feature:7:in `given signed in "a_new_user@example.com/test_password"' 

... assume related sending of confirmation email when new user created, have configured in config/environments/cucumber.rb:

app::application.configure    # sets our mailer localhost mailer (devise)   config.action_mailer.default_url_options = { :host => 'localhost:3000' }  end 

how around this/fix this/avoid this? let me know if need anymore info me solve issue...

do have in environments/test.rb file:

config.action_mailer.delivery_method = :test 

this tells rails "not deliver emails real world".


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -