3 ms·
Generally, you write an acceptance test, watch it fail, drop down into the unit tests that get your code going, pull back up into your acceptance test, move on
by steveklabnik 16y ago
Generally, you write an acceptance test, watch it fail, drop down into the unit tests that get your code going, pull back up into your acceptance test, move on to the next part...
Here, I wrote something about this: http://timeless.judofyr.net/bdd-with-rspec-and-steak http://timeless.judofyr.net/bdd-with-rspec-and-steak
Most of these are not 'unit' tests in the traditional sense of the word. Unit tests are useful, but only as part of a larger testing strategy.
- Chris_Newton 16y ago> Unit tests are useful, but only as part of a larger testing strategy. I agree, but I think you're making my point for me. TDD and unit tests alone are not enough, which motivates further developments like BDD. I think we can apply an analogous argument even to a BDD process, because there are many advantageous properties code might have that can not be determined effectively using a finite number of specific, automated, behavioural tests, no matter what level of abstraction those tests run at. Your BDD process is not as limited as TDD, but it still contains a "magic happens" line, "Refactor code as appropriate."