I'm building an app in Rails 3 using Authlogic for authentication. I have a User model with a database table and a user_session model without one
All of my tests fail, whether I run
Error: test_the_truth(UsersControllerTest): ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: user_sessions: DELETE FROM "user_sessions" WHERE 1=1
It's expecting user_session to have a table even though it inherits from Authlogic. Does anybody know how to fix this?
Ensure you have defined properly test database in config/database.yml, then try
rake db:test:prepare
orrake db:migrate RAILS_ENV=test
.