Hi
Thank you for your response
I gone through the links and your explanation but frankly speaking i
understood but not fully

I have one doubt

unit testing (For model)
what it does?(According to my knowledge)
1. It inserts in to database an temporary data from fixtures something.yml
when i run rake test:units


FunctionalTesting (For  controller)
what it does?(According to my knowledge)
It checks if the controller is working correctly or not

But when i run rake test:functionals i have one method called

def test_should_create_post
    assert_difference('Post.count') do
      post :create, :post => {:title=>"my",:body=>"my body" }
    end

but it is not adding to database

please tell me

1. what unit test does
2. what functional test does

-- 
Karthik.k
Mobile - +91-9894991640


On Thu, Jul 23, 2009 at 6:08 PM, Marnen Laibow-Koser <
rails-mailing-l...@andreas-s.net> wrote:

>
> James Byrne wrote:
> [...]
> >
> > The real test for yourself is the truthful answer to the question: Is
> > what I am doing HARD?  If the answer is no then you are missing
> > something important (or are a savant).
>
> I'm going to disagree *very* strongly with you here.  TDD certainly
> takes discipline, and that may be hard at first.  But once you do a
> little and pick up the pattern, it is exhilaratingly easy, at least for
> me.
>
> So, I would say to ask yourself: is what I am doing HARD?  If the answer
> is yes, you have missed something.  Learn the missing piece.  Keep going
> until it becomes easy.  If it is hard, you are working too hard and you
> need to stop and sharpen your saw.
>
> TDD and BDD is HARD.  It is
> > VERY HARD.  Because you have to cast your every design intent as a
> > programatically testable manifestation.
>
> Indeed.
>
> > That means you have to think
> > very carefully about precisely what you NEED to accomplish and HOW to
> > accomplish it,
>
> No!  Your tests should generally test the result, not the
> implementation.
>
> Best,
> --
> Marnen Laibow-Koser
> http://www.marnen.org
> mar...@marnen.org
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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