why I need testings in rails?

Pete wrote:

All the time I hear that RoR has great testing enviroment. Well, why I need tests? I test my webapp all the time - code a page and than test it. So why I need that extra test - does it make some special tests? I am confused

A car has brakes not so it can stop, but so it can safely go fast.

If you write many pages, and then add new features to all of them, you might break something. So if you have a lot of pages, you might have manually retest everything, to avoid releasing bugs. Manually retesting slows you down.

So if your car has no brakes, you must drive very slow, to avoid trouble at intersections!

With tests, you can rapidly change code long after you wrote it. The tests will tell you when to stop changing, if something breaks.

Then, instead of debugging, you can often use Undo to revert your change. Then all the tests pass again, and you can try a smaller change.

People who use Test-Driven Development always report they spend much less time debugging.