2009/8/1 karthik k <cse.k.kart...@gmail.com>:
> hi Colin
>
> 1) Failure:
> test_for_update(CountyTest) [test/unit/county_test.rb:19]:
> Name has already been taken.
> <false> is not true.
>
>

Could you reply with your comments inserted into the existing email
please rather than at the top, it makes it much easier to follow the
thread, so your comment above should have been after my bit asking for
the error.

Have you got a validates_uniqueness_of :name?  I think the error means
there are two with the same name. If you can't see the problem post
your counties.yml.

Earlier it was suggested that you look at the rails guides Getting
Started and Testing.  Have you done that and do you understand all
that is in them? (Or at least understand most of it)

Colin

>
> --
> Karthik.k
> Mobile - +91-9894991640
>
>
>
> On Sat, Aug 1, 2009 at 3:59 PM, Colin Law <clan...@googlemail.com> wrote:
>>
>> 2009/8/1 karthik k <cse.k.kart...@gmail.com>:
>> > hi
>> > i am updating the data in unit testing
>> >
>> > def test_for_update
>> >     post=counties(:one)
>> >     assert post.valid?, post.errors.full_messages
>> >     assert post.update_attributes(:name=>"")
>> >   end
>> >
>> >
>> > name should not be empty but as you said i displayed
>> >
>> > "assert post.valid?, post.errors.full_messages"
>> >
>> > But i am not getting error message in assert but getting error message
>>
>> What is the error message you see (all of it)
>>
>> Colin
>>
>>
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to