Another way to look at this “simplest possible way to make the failing test pass” is to imagine you have a developer on the team, who is removing any code that is not tested.
So that additional if statement is not tested by the test. That means it can be safely removed.
You can apply such radical technique to teams that do TDD rigorously. And if you knew there is a person on your team (and that person – is every member of the team), you are probably going to make sure to have all the production code covered.
You just don’t add any code that is not tested, as simple as that.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.