1

I have a Rails 4.2 app using Devise. I had to customize the Registrations controller in #create, and whenever I run my feature specs, I keep getting the error:

Errno::EADDRNOTAVAIL: Cant assign requested address - connect(2) for nil port 0

enter image description here

I'm out of ideas. What's going on? All my devise controller specs work fine, testing manually works fine, but what configuration remains?

My feature spec: /spec/features/visitor/visitor_can_signup_spec.rb

enter image description here

Tot Zam
  • 8,406
  • 10
  • 51
  • 76
Matthew
  • 2,035
  • 4
  • 25
  • 48
  • did you have a look at https://github.com/thoughtbot/capybara-webkit/issues/644 and http://stackoverflow.com/a/13853962/1033737 ? – fabdurso Mar 07 '16 at 09:44
  • what is the :devise metadata tag on your feature doing? Is it used to start an auth server of some kind for those feature tests? – Thomas Walpole Mar 07 '16 at 21:06

1 Answers1

0

Turns out i had my config/environments/test.rb had the wrong mailer setting.

I had

config.action_mailer.delivery_method = :smtp

so i changed it to:

config.action_mailer.delivery_method = :test
Matthew
  • 2,035
  • 4
  • 25
  • 48