I am trying the Restful-Authentication (latest version, downloaded
today) and upon running the generator, doing the migration, prepping
the test system and putting the resources in routes.rb I get a Rspec
test failure:
'SessionsController logins and redirects' FAILED
expected not nil, got nil
code around the failure is:
it 'logins and redirects' do
post :create, :login => 'quentin', :password => 'test'
session[:user].should_not be_nil # -> Error is on this line
response.should be_redirect
end
Error is:
1)
'SessionsController logins and redirects' FAILED
expected not nil, got nil
/Users/dhf/NetBeansProjects/snrbad/spec/controllers/
sessions_controller_spec.rb:12:
Changes in your app can cause these test failures. I very recently
used the rspec version when it was committed and had no problems.
It's only a restful_auth issue if it does this on a brand new app.
Please do send a patch if you uncover a bug.
it 'logins and redirects' do
post :create, :login => 'quentin', :password => 'test'
- session[:<%= file_name %>].should_not be_nil
+ session[:<%= file_name %>_id].should_not be_nil
response.should be_redirect
end
it 'fails login and does not redirect' do
post :create, :login => 'quentin', :password => 'bad password'
- session[:<%= file_name %>].should be_nil
+ session[:<%= file_name %>_id].should be_nil
response.should be_success
end
it 'logs out' do
login_as :quentin
get :destroy
- session[:<%= file_name %>].should be_nil
+ session[:<%= file_name %>_id].should be_nil
response.should be_redirect
end
Thanks. I thought I had tried everything before I submitted the
problem. I even had done but did not mention what Rick had recommended
and it failed also.
When will then plugin be updated so I do not have to make the changes
on each project?