Colin A. Bartlett on 13 Sep 2007 15:10:43 -0000 |
Cassius Rosenthal wrote: My conclusion --which I hope Colin will comment on-- is that rSpec has many drawbacks, but we should all be using it anyway. Disadvantages of rSpec/BDD:How does it break DRY? * slows development for experienced codersWriting tests may add marginal more time to the initial coding but saves mountains of time squashing bugs later. * does not suggest good testsNot sure I follow. Use RCov and Heckle to check if your tests are good. * differentiation between 'good' and 'bad' test is not implied by syntaxNot sure I follow. What's a bad test? A test (spec, really) that just test's ActiveRecord functions is lame because ActiveRecord is already heavily tested. Other then that, what is there? * model tests seems solid, but controller tests seem excessive (map.resoures.should_not be_trusted =>?), and view tests don't seem meaningfulI've got no problems with controller tests. And you don't need to spec you entire view. Just the stuff that's business-relevant. How about a test that makes sure @credit_cards.display_all isn't run unless you're logged in as an Admin? Or, don't spec your views at all. Some specs is better then no specs. * trivial changes to schema often will require non-trivial changes to model specsI'm not sure that's true. But trivial changes to a schema can kill your app. Dead app = unhappy client. Accurate specs = Happy client. * doesn't offer integration tests, although you can simulate them -- documentation suggests using selenium instead of RSpec It's got 'em now. Haven't tried it but Story Runner sounds cool: http://evang.eli.st/blog/2007/9/1/user-stories-with-rspec-s-story-runner
_______________________________________________ To unsubscribe or change your settings, visit: http://lists.phillyonrails.org/mailman/listinfo/talk
|
|