4 ms·
I start by inserting asserts that fail. I keep at it until the expected failures occur. As I fix things, I move those failures.
by anamax 5y ago
I start by inserting asserts that fail. I keep at it until the expected failures occur. As I fix things, I move those failures.
- ed25519FUUU 5y agoI do this also. Is there a word for it? I also start a mocking by putting an assert in the function I’m mocking to make sure my mock covers it.
- czx4f4bd 5y agoI think the Red-Green-Refactor loop is pretty close. I learned TDD via obeythetestinggoat.com and it really instilled in me the urge to see a test fail before I trust it when it passes. Sometimes I forget to check that my test fails the first time, so I’ll go back and deliberately break the function under test just to see it fail.
- anamax 5y agoA test that never fails is a slow comment.