I think you mean to have: l.errors.on(:name) Note: 'errors', not 'error'
-Rob On Dec 1, 2008, at 7:05 PM, Maulin Pathare wrote: > > Rob Biedenharn wrote: >> On Dec 1, 2008, at 2:14 PM, Maulin Pathare wrote: >>> >>> >>> When I run rake test:units from the shell I get the following error >>> >>> rake aborted! >>> You have a nil object when you didn't expect it! >>> You might have expected an instance of ActiveRecord::Base. >>> The error occurred while evaluating nil.[] >>> >>> I am running rails version 2.2.2 >>> >>> Does anyone know whats wrong? Thanks. >> >> >> Perhaps you need a line between 6 & 7 with: >> >> assert !l.valid? >> >> Otherwise the error object associated to the model will not have been >> created. >> >> -Rob >> >> Rob Biedenharn http://agileconsultingllc.com >> [EMAIL PROTECTED] > > Hey, > Thanks for the reply. The assert !l.valid? did not help. I still get > the > same error. > > When I run the command with the --trace command, I can see that rake > fails right after the execute db:test:purge step. I have included the > trace. Rob Biedenharn http://agileconsultingllc.com [EMAIL PROTECTED] +1 513-295-4739 Skype: rob.biedenharn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---