> Some would say I'm doing the rspec backwards, > but I find it too restricting to stub/mock interfaces to do TDD with rspec > as I'm writing the code. I find it slows me down, and *decreases* quality > because refactoring gets harder if I'm having the nail down exactly how the > code works with specs while it's still fluid and undefined.
Heresy! :P. I'm going to bang on about this because, well, that's what I do :) You are running two risks here 1) because you don't first see your specs fail properly you run the risk they will pass when they shouldn't and/or report failures badly. If your code can have bugs, so can your tests. 2) you are not getting the design benefits of TDD ( which many would say is the main point). I find TDD makes refactoring easier because it ensures my design is highly cohesive and loosely coupled. I'd encourage you to keep practicing test driving your design at the unit level. You can always spike a design first if you are having trouble solidifying it, but personally I use the tests to *help* solidify the design. >BDD fits really naturally though. *ahem*, BDD != cucumber. rspec is also BDD tool and BDD is about driving development by specifying the behaviour of your units as well as your system. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en -~----------~----~----~----~------~----~------~--~---
