Good debugging mechanism

Hi,

Can I know the best debugging mechanism that can be used in ruby on
rails application?

Thank You,
Uma Mahesh Varma,
Skype : umamahesh.nyros

On Nov 6, 2011, at 21:18 , Uma Mahesh wrote:

Can I know the best debugging mechanism that can be used in ruby on rails
application?

writing good tests.

seriously.

writing good tests.

How do you debug your tests then? By writing other tests?
Tests may show you the need to debug that’s it.

Regards,
Rimantas

shall we need to have test cases for every methods that were implemented
in the application ?

Thank You,
Uma Mahesh Varma,
Skype : umamahesh.nyros


From: Rimantas L. [email protected]
To: ruby-talk ML [email protected]
Sent: Monday, November 7, 2011 12:59 PM
Subject: Re: Good debugging mechanism

writing good tests.

How do you debug your tests then? By writing other tests?
Tests may show you the need to debug that’s it.

Regards,
Rimantas

On Nov 7, 2011, at 00:30 , Uma Mahesh wrote:

shall we need to have test cases for every methods that were implemented in the
application ?

I test anything that I think needs testing, public or private (not that
I actually use private, I have methods I consider private). If it is
of sufficient complexity (usually anything that flogs more than a couple
points, I write tests for it.

Generally it is sufficient to test only the public methods of your
implementation, but to ensure good coverage it is often easier to test
the
non-public helper methods.

When you are ensuring that your application is tested it is necessary to
test every code path, which is why you will end up with more tests
methods
than public methods.

On Nov 6, 2011, at 23:29 , Rimantas L. wrote:

How do you debug your tests then? By writing other tests?
Tests may show you the need to debug that’s it.

If you do it right, you don’t ever debug. Whenever you set a breakpoint
and then look at a variable, you should be writing a test instead. It is
harder to explain than it is to sit down, pair, and show. If you’re ever
in Seattle, come by Seattle.rb.