On Sat, Jun 12, 2010 at 5:27 AM, Bob Silverberg wrote: > I tend to be with Dan on this one, mainly because setting up unit > tests involving an MG event is such a pain. I'm not near a "real" > computer right now, so I cannot state with accuracy how easy it would > be to use mocks to test a controller. Creating the mocks would be > simple, but getting them into the controller method might not be.
For testing framework stuff, I've found it easiest to just load up the framework and do what I guess would be considered integration tests. It's ugly, cheesy, and like I said, more of an integration test (so there a *lot* more potential that a problem stems from something besides what is under test)... but that said, it works /pretty/ well. Better than no tests at all, if you've got a lot of logic in your controllers (which you shouldn't, but some stuff like scaffolds sorta encourages (or encouraged) logic in controllers.). Eh. YMMV, etc.. :Den -- Blind commitment to a theory is not an intellectual virtue: it is an intellectual crime. Imre Lakatos -- Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" 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/model-glue?hl=en
