3 Rules of TDD

  • 3 rules of TDD

    1. You are not allowed to write any production code before you have written a test that fails because the production code doesn't exist.

    2. You are not allowed to write more of a test that is sufficient to fail. Not compiling is also failing. As soon as the test does not compile, you must stop writing it and fix it.

    3. You are not allowed to write any more production code that is sufficient to pass the failing test.