The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

mikimiki (9) [Avatar] Offline
#1
Hello Ryan,

I was able to get this feature working after doing the migrations for the User model for the :confirmable features.

However this broke my earlier feature from 6.2. User signup.

The error I get is:

Feature: Signing Up
In order to be attributed for my work
As a user, I want to be able to sign up

Scenario: Signing Up # features/signing_up.feature:5
Given I am on the home page # features/step_definitions/projects_steps.rb:8
When I follow the "Sign Up" link # features/step_definitions/projects_steps.rb:12
And I fill in the "Email" field with "test_user@ticketee.com" # features/step_definitions/projects_steps.rb:16
And I fill in the "Password" field with "test_user_password" # features/step_definitions/projects_steps.rb:16
And I fill in the "Password confirmation" field with "test_user_password" # features/step_definitions/projects_steps.rb:16
And I press the "Sign up" button # features/step_definitions/projects_steps.rb:28
Then I should see "You have signed up successfully." # features/step_definitions/projects_steps.rb:66
expected there to be content "You have signed up successfully." in "Ticketee


A message with a confirmation link has been sent to your email address. Please open the link to activate your account.


Ticketee
Sign Up
Projects

New Project


" (RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/projects_steps.rb:68:in `/^I should see "([^"]*)"$/'
features/signing_up.feature:12:in `Then I should see "You have signed up successfully."'

This seems entirely reasonable to me given that sign up now needs email confirmation (or am I missing something obvious)?

What is the best way to handle this? No body else seems to have hit it.

Thank you for any feedback.

Best.

rails (3.1.3)
cucumber-rails (1.2.1)
devise (2.0.0)
ryanbigg (423) [Avatar] Offline
#2
Re: 6.3. Confirmation link sign-in
I think this is because you're using Devise 2.0. The book was written using Devise 1.3, but I think versions up to the latest 1.x will work also with the book.

Downgrade your version of Devise or fix the feature to match the new message.

Thanks for reading!
mikimiki (9) [Avatar] Offline
#3
Re: 6.3. Confirmation link sign-in
Hello Ryan,

Thanks for the suggestion. I chose the route of modifying the Cucumber feature to make headway.

The good news is that everything fixes itself once I complete 8.3.4
Fixing Signing Up.

So it is possible to use Devise 2.0 and follow the book.

Thanks for your help!