Unit Tests as Documentation
One aspect of using test-driven development is that your unit tests become your documentation. They define your code’s API(Application Program Interface) and how it works. To learn how the code works, all you need to do is look at the tests.
The reasoning behind this is twofold: first, no one updates comments left in the code and second, the unit tests, if comprehensive, have to stay up to date in order to pass. This means that the tests evolve along with the code and need to be changed and updated (and not simply commented out or deleted) as the code changes.
The problem with comments in the code is that they quickly become outdated and no longer describe the code. Every time you refactor the code, if you are relying on comments, you have to refactor the comments. Whereas the unit tests have to be refactored right along with the code.