> and it often takes a lot of time to set up a test, in which you wake up with a better / cleaner solution. (so the test you wrote is testing the wrong implementation.)
Isn't that a smell?
There was a recent topic on testing. In my view, I should be testing the API of units of coherent logic. If I change the underlying implementation of that logic, why should my tests change?
i agree absolutely, which is why when i'm stuck in the middle of writing implementation, i'll write a "TODO: now do foo then bar" and not bother trying to "write a failing test"
Isn't that a smell?
There was a recent topic on testing. In my view, I should be testing the API of units of coherent logic. If I change the underlying implementation of that logic, why should my tests change?