> Especially the crap about "make the test fail first" (making the test fail is useful, especially if you're unfamiliar with some aspect of it), but it should not be an obligation
Sometimes I write code to fix a bug, then a test the tests my bugfix. Test passes. I'm done right? Well, I make sure my test fails without the bugfix. About half the time, the test still passes. ie I wasn't testing what I thought I was testing. That's why you make the test fail.
Re:TDD did not live up to expectations
by raverbashing on Saturday July 01, 2017 @07:22AM
(#14676595)
Yes, that's why I say "making the test fail is useful" ;)
And yes, I've seen this happen as well, either you're not testing the bug-causing issue or you're using a "Magical Mock Library" where x.does_thing() just returns true and you thought it did the thing but it didn't.
The term making the test fail, isn't about explicitly making the test fail.
It's about the fact that it's not implemented yet, so of course it going to fail!
> I absolutely think _tests_ are useful, but have never found any advantages to test-DRIVEN-development (test-first).
Seconded. Especially the crap about "make the test fail first" (making the test fail is useful, especially if you're unfamiliar with some aspect of it), but it should not be an obligation