Why is this very basic unit test failing (ruby 1.9.2p290, Rails 3.0.9)?

I think the key is in the 10th line of the stack trace.

I think the key is in the 10th line of the stack trace: /Users/perry_mac/. Rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.9/lib/active_record/fixtures. Rb:569:in `delete_existing_fixtures' Notice fixtures.

Rb and delete_existing_fixtures. Rails cleans all the fixtures out of the database before running your test suite. Do you have a user_sessions.

Yml file in test/fixtures?

Yes. I just renamed it to: user_sessions.yml. Sav and the test now passes.

Thanks! – Perry Horwich Sep 5 at 16:39.

Rails g model user_session as detailed in the online offering here: logansbailey. Com/2010/10/06/how-to-setup-authlogic-in-rails-3 – Perry Horwich Sep 5 at 16:40 And to further detail where I went wrong here.... I gather I created a model with no corresponding table. The creation of the model user_session also created a user_session.

Yml under test/fixtures (and in other spots too). When invoking 'rake test' fixture data is deleted and re-created. Since no user_session table exists, the pre-testing delete/create threw an error.

– Perry Horwich Sep 5 at 16:52 Did I side-step "best practice" by not creating a user_sessions table? It seems the controller and model are enough. To facilitate testing, should I create a rudimentary user_session table too?

Many thanks again - Perry – Perry Horwich Sep 5 at 17:59 No table is necessary; authlogic sessions look like ActiveRecord models, but aren't really. Models can be generated without creating a corresponding fixture file by using --skip-fixture or --fixture=false. – Dave Newton Sep 5 at 23:53 Excellent.

Thanks Dave! – Perry Horwich 10/10/068 at 2:55.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions