jitterted, On today's solo stream, I was doing my #TDD as usual, and, because I use Predictive Test-Driven Development (see https://ted.dev/articles/2021/03/05/clarifying-the-goal-of-behavior-change/), I was able to avoid writing code that wouldn't get the test to pass.
Why? Because 3 separate times, I predicted how the test should fail, and it failed differently! They failed in the unexpected way because I had either written the test setup incorrectly, or misunderstood a library method¹.
Had I just looked out for a failing test, I would have started writing code to make it pass, and been disappointed that it didn't pass when I was done.
--
¹ Turns out Java's String.indent(4) normalizes line endings, meaning it will add a line ending to the last line, even if it didn't have one before! Surprise!
Add comment