When writing ruby (& ror) applications with BDD, should the step definitions be written before you even create the models, views and controllers in order to save the maximum headache?
When writing ruby (& ror) applications with BDD, should the step definitions be written
Share
Yes, you should – that’s the main idea of BDD and TDD, respectively. Red – Green – Refactor. First start off with your feature (e.g. use Cucumber here), then write the step definitions and finally your code.
The RSepc Book is a good read to capture the whole thing. Take at look at figure 1.1 The BDD-cycle on page 29. This gives you a good overview on how to approach BDD and TDD and also has some nice examples.