RailsApps / rails3-devise-rspec-cucumber

An example Rails 3.2 app with Devise and RSpec and Cucumber.
http://railsapps.github.io/
445 stars 144 forks source link

cucumber failing in 'user signs up with valid data' scenerio #20

Closed debugging closed 12 years ago

debugging commented 12 years ago
      Couldn't find User with id=sign_out (ActiveRecord::RecordNotFound)
      ./app/controllers/users_controller.rb:5:in`show'
      (eval):2:in `send'
      (eval):2:in`click_button'
      ./features/step_definitions/user_steps.rb:13:in `sign_up'
      ./features/step_definitions/user_steps.rb:48:in`/^I sign up with valid user data$/'
      features/users/sign_up.feature:10:in `When I sign up with valid user data'

It is as if the sign_out route isn't mapped correctly, but if I go to http://127.0.0.1:3000/users/sign_out it works fine and redirects to sign_in.

Any ideas what this could be?

DanielKehoe commented 12 years ago

See if this discussion helps: https://github.com/RailsApps/rails3-mongoid-devise/issues/4

-- Daniel

debugging commented 12 years ago

Strange, this made it work:

Given /^I exist as a user$/ do sign_up valid_user visit 'http://127.0.0.1:3000/users/sign_out' end

i.e. appending http://127.0.0.1:3000 to the call to visit.

And now I a am getting another error, which probably means I have to prefix the http and 127....1 on it also.

Why would this be happening?