3 ms·
Parent was suggesting that an existing system's tests should already pass (green) before you monkey with it (red). Although if you're fixing bugs, red-green-re
by prawks 13y ago
Parent was suggesting that an existing system's tests should already pass (green) before you monkey with it (red).
Although if you're fixing bugs, red-green-refactor can work well.
- AYBABTME 13y agoIt's very possible that without a red test, your green test would be green with inputs for which you intended it to be red. It's not enough to know that the test pass, you need to make sure the test would fail. Otherwise it's like having a cybernetic canary that doesn't need air to survive (great example, isn't it?).
- ollysb 13y agoIf you were expecting the test to fail for some inputs you might as well just add another test case for that scenario.