There's probably still a strong case for testing models, if you consider their API to be one that shouldn't change, and if changes in them is considered a "bug" in the application. The point here is that you want to follow 3 rules of speccing:
1. Your tests should fail if you break the interface with your users 2. Your tests should not fail if the interface has not broken 3. Only write tests that confirm things that you actually care about It doesn't necessarily violate TDD at all here. You can still test first. You just test the interface, not the internals of your application. -- Yehuda On Sun, Oct 19, 2008 at 10:51 PM, Jarkko Laine <[EMAIL PROTECTED]> wrote: > > On 20.10.2008, at 2.50, Matt Aimonetti wrote: > > Hi Ashley, >> >> You might want to check on >> http://www.slideshare.net/wycats/testing-merb-presentation Yehuda's >> presentation on testing Merb apps the Merb way. >> >> If you generate a new 1.0RC app and then a resource you will notice that >> we don't generate any controller or view specs anymore. The reason being >> that we believe you should test the full request ad not just mock what the >> controller does. >> > > Could you elaborate with the decision a bit, since I smell there's a bit of > a conflict with the Rspec/BDD ideas here? It seems to me that the new way of > testing in Merb is exactly the same as using story runner/Cucumber, except > that it doesn't really test the whole stack like using stories with Webrat > does. > > Also, are you still encouraging unit testing for models or do you think the > full-request testing should take care of testing them as well? > > //jarkko > > -- > Jarkko Laine > http://jlaine.net > http://dotherightthing.com > http://odesign.fi > > Check out my latest book, Unobtrusive Prototype, fresh off the Peepcode > oven: > http://peepcode.com/products/unobtrusive-prototype-js > > -- Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" 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/merb?hl=en -~----------~----~----~----~------~----~------~--~---
