That's the only way I've ever heard it described. I thought that's why it's called "Test Driven"
That's the only way I've ever heard it described. I thought that's why it's called "Test Driven"
If you read that as "write every single one of your tests, then write the code", then you see it as a strawman and not the point of TDD.
If you read that as "before you write any specific line of code, you write the test for it first", then you are likely to see that as the same as TDD.
I intended the second reading. I can see how both are accurate ways to read it, though. Apologies for the confusion.
Turns out we are all in agreement after all.
Writing tests before you work on the unit you're working on shouldn't be a problem because you should know what that unit is supposed to do. If you don't, then it doesn't matter if you do TDD, Agile, BDD, or whatever. You're not going to be able to do it right. Go have a conversation with someone to find out what that is supposed to do.