Welcome back to the “Getting Stuck While Doing TDD” series. Today we are going to see the results of getting stuck while doing TDD and scratch the surface of how to avoid this outcome.
Code examples today will be in Ruby programming language. The technique itself is, of course, language-agnostic.
TL;DR
- It is painful and difficult to force your way through when getting stuck in TDD.
- It results in degraded guarantees from TDD (such as test coverage, semantical stability, and confidence).
Ways to avoid this outcome:
- do not write tests that will not fail with the current production code
- choose next test to write that will address particular detail about production code that is wrong or not general enough (Triangulation)
Finally, do not forget to remove redundant tests if any.