does active record really work for oracle

Dave Rose
Fri, 24 Aug 2007 15:58:28 -0000

i get this when i try to unit test:

C:\railsspace>ruby c:\railsspace\test\functional\user_controller_test.rb
Loaded suite c:/railsspace/test/functional/user_controller_test
Started
..E.
Finished in 0.578 seconds.

  1) Error:
test_registration_success(UserControllerTest):
RuntimeError: "DESC users" failed; does it exist?
    (eval):3:in `describe''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record
/connection_adapters/oracle_adapter.rb:316:in `columns''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record
/base.rb:763:in `columns''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record
/base.rb:2060:in `attributes_from_column_definition_without_lock''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record
/locking/optimistic.rb:45:in `attributes_from_column_definition''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record
/base.rb:1502:in `initialize_without_callbacks''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record
/callbacks.rb:225:in `initialize''
    c:/railsspace/config/../app/controllers/user_controller.rb:10:in
`new''
    c:/railsspace/config/../app/controllers/user_controller.rb:10:in
`register''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/base.rb:1095:in `send''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/base.rb:1095:in `perform_action_without_filters''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/filters.rb:632:in `call_filter''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/filters.rb:619:in `perform_action_without_benchmark''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/benchmarking.rb:66:in `perform_action_without_rescue''
    C:/ruby186/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/benchmarking.rb:66:in `perform_action_without_rescue''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/rescue.rb:83:in `perform_action''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/base.rb:430:in `send''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/base.rb:430:in `process_without_filters''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/filters.rb:624:in `process_without_session_management_support''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/session_management.rb:114:in `process_without_test''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/test_process.rb:15:in `process''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/test_process.rb:382:in `process''
    C:/ruby186/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controll
er/test_process.rb:353:in `post''
    c:/railsspace/test/functional/user_controller_test.rb:50:in
`test_registrati
on_success''

4 tests, 12 assertions, 0 failures, 1 errors

  def test_registration_success
    post :register, :user => { :screen_name =>
"new_screen_name",
                                :email       =>
"valid-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org",
                               :password     =>
"long_enough_password" }
    # Test assignment of user.
    user = assigns(:user)
    assert_not_nil user
    # Test new user in database.
    new_user = User.find_by_screen_name_and_password(user.screen_name,
                                                     user.password)
    assert_equal new_user, user
    # Test flash and redirect.
    assert_equal "User #{new_user.screen_name} created!",
flash[:notice]
    assert_redirected_to :action => "index"
  end