I've had conversations about this topic in the past, and I think I might know the answer, but I've not been able to articulate it properly.
Here's what I think I know:
I suspect you are test-first rather than test-driven if you already have the idea in your head of how things will work before you write tests, so you write tests first that will test your idea before implementing your idea. I.e. Your idea of the implementation comes first, and drives what the tests look like.
If you're test-driven then you're trying to get the test to drive what the implementation looks like. You write a test for some behaviour you want rather than a preconceived idea of the implementation, so that you have to come up with an implementation in the "refactor" stage to pass the test well.
My questions are:
- Have I understood this correctly?
- How does one get into the test-driven mindset from the test-first mindset, when it's natural for most developers to immediately start exploring solutions in their mind before they even reach out for the keyboard?