I generated scaffolding for User with the following schema:
create_table "users", :force => true do |t| t.string "name" t.string "company" t.string "lastcompany" t.datetime "changed" t.datetime "created_at" t.datetime "updated_at" end
When I run the automatically generated functional tests against the Users controller, I get one failure:
test_should_update_user(UsersControllerTest): NoMethodError: undefined method `|’ for Wed Apr 29 23:49:18 UTC 2009:Time
Oddly, if I just run this one test it passes:
>ruby functional\users_controller_test.rb -n test_should_update_user Loaded suite functional/users_controller_test Started . Finished in 0.594 seconds.
1 tests, 1 assertions, 0 failures, 0 errors
The failure seems to be on this line of my controller:
if @user.update_attributes(params[:user])
Because if I change it to "if true" my test passes.
The only thing unique about this particular class is that it has an additional datetime member. I'm not having luck with google searches because of that pipe character. Hopefully I'm running into a fairly common failure here?