Hi Colin

Thank you
I saw that link but as a fresher not able to understand
but if i have any doubt please guide me


-- 
Karthik.k
Mobile - +91-9894991640


On Sat, Aug 1, 2009 at 1:40 PM, Colin Law <clan...@googlemail.com> wrote:

>
> 2009/8/1 karthik k <cse.k.kart...@gmail.com>:
> > Hi Colin
> >
> > Thank you very much
> >
> > can you please guide me for testing purpose because i am very new to ruby
> on
> > rails
> >
>
> Did you try what I suggested?
>
> If you have not already done so I would look at the RoR guides at
> http://guides.rubyonrails.org/ particularly Getting Started and
> Testing Rails Applications.  Also the rest of them in fact.
>
> Colin
>
> >
> > --
> > Karthik.k
> > Mobile - +91-9894991640
> >
> >
> > On Sat, Aug 1, 2009 at 1:29 PM, Colin Law <clan...@googlemail.com>
> wrote:
> >>
> >> 2009/8/1 karthik k <cse.k.kart...@gmail.com>:
> >> > def test_check_for_validity
> >> >     post=County.new(:name=>"myname",:description=>"mydesc")
> >> >     assert post.save
> >> >   end
> >> >
> >> > above is the method and when i run unit test it is saying as
> >> >
> >> > 1) Failure:
> >> > test_check_for_validity(CountyTest) [/test/unit/county_test.rb:10]:
> >> > <false> is not true.
> >> >
> >> > what does it say i cannot under stand
> >> >
> >>
> >> It is saying that the post.save failed (the assert is expecting true,
> >> so false makes the test fail).  Possibly your validations are failing.
> >>  If you put the line
> >>
> >> assert post.valid?, post.errors.full_messages
> >>
> >> before the save this will check the item for validity before
> >> attempting to save it and show you any errors from validations (I
> >> think).
> >>
> >> 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