I have the following steps in a capybara/rspec integration test, that is simply trying to sign up a new member.
visit new_member_registration_path
fill_in('Name:', :with => 'Rob Doe' )
fill_in('member_email', :with => 'rob@smith.com' )
fill_in('member_email_confirmation', :with => 'rob@smith.com' )
fill_in('member_password', :with => 'secret')
fill_in('Company or Venue Name:', :with => 'Rob Inc.')
fill_in('Contact Number:', :with => '040544404440')
click_button('Sign up')
save_and_open_page
For some reason the ’email’ and ‘password’ data is not being passed to the DeviseRegistrations controller (it is blank when viewing the test log) and therefore causing the validation to fail. However up until the save_and_open_page there is no rspec errors (so those fields are being filled in).
What am I missing? Do I need to subclass the DeviseRegistrations controller?
Tested on Rails 3.0.7 with rack-test 0.5.7 and rails 3.1rc1 and rack-test 0.6.0
The problem was in the application layout file. I had another (albeit hidden) form that was posting the blank form fields.
After I created a blank project and saw that it worked perfectly, I peeled back all the potential parts of my app until I found the culprit.
So the answer to the question is, no, a custom devise controller is not required when you are using custom devise views.