[Rails] Re: Authlogic password problems using rspec
doh, i ran into same problem. the fixture was generated with the now invalid password column. simply delete it $ rm test/fixtures/users.yml On Jun 29, 4:06 pm, Yoann-Z yoann.zim...@gmail.com wrote: Hi, I have a problem using rspec with my rspec tests with my application. I used authlogic to create my athentication system, following the video on railscast. It works fine with cucumber, but I always have a problem with rspec : ActiveRecord::StatementInvalid in 'ApplUsersController new action should render new template' SQLite3::SQLException: table appl_users has no column named password: INSERT INTO appl_users (created_at, updated_at, username, id, password, email) VALUES ('2009-06-29 23:01:48', '2009-06-29 23:01:48', 'MyString', 996332877, 'MyString', 'MyString') In my spec file it is related to these lines : it new action should render new template do get :new response.should render_template(:new) end I think it is because of my migration file but I'm really not sure def self.up create_table :appl_users do |t| t.string :username t.string :email t.string :crypted_password t.string :password_salt t.string :persistence_token t.timestamps end end could you help me please? Thanks by advance -Yoann-Z --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: Authlogic password problems using rspec
On Mon, Jun 29, 2009 at 4:06 PM, Yoann-Z yoann.zim...@gmail.com wrote: Hi, I have a problem using rspec with my rspec tests with my application. I used authlogic to create my athentication system, following the video on railscast. It works fine with cucumber, but I always have a problem with rspec : ActiveRecord::StatementInvalid in 'ApplUsersController new action should render new template' SQLite3::SQLException: table appl_users has no column named password: INSERT INTO appl_users (created_at, updated_at, username, id, password, email) VALUES ('2009-06-29 23:01:48', '2009-06-29 23:01:48', 'MyString', 996332877, 'MyString', 'MyString') In my spec file it is related to these lines : it new action should render new template do get :new response.should render_template(:new) end I think it is because of my migration file but I'm really not sure def self.up create_table :appl_users do |t| t.string :username t.string :email t.string :crypted_password t.string :password_salt t.string :persistence_token t.timestamps end end could you help me please? Thanks by advance -Yoann-Z Yoann, you're using crypted_password field in your migration but you're trying to insert into a table using the field, password. Good luck, -Conrad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---