Autology test cases awaiting user_sessions tables

I am using Authlogic (along with Authlogic RPX ) in a new Rails 3 application (beta4, just upgraded to RC).

I can not pass any of my functional tests. Anytime when I try to run even the most basic test, I get this error:

  4) Error:
     test_the_truth(UsersControllerTest):
     ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: 
     user_sessions: DELETE FROM "user_sessions" WHERE 1=1

It doesn't matter which controller I am testing (even if it is not connected with Authlogic), it seems that my model UserSessionrequires a database table, although it inherits directly fromAuthlogic::Session::Base

Outside of using the RPX plugin, this is a super-basic Authlogic installation, and I don't have this problem launching the application itself. Only in tests.

Any thoughts?

+3
source share
1 answer

Looks like I was hacked by Rails 3 backtrace filtering . I re-run my tests to provide full backtracing:

BACKTRACE=foo rake test

It turns out the problem was trying to load test devices for users_sessionwhich were automatically generated with my classes.

+1
source

Source: https://habr.com/ru/post/1756666/


All Articles