Hi -- On Fri, 7 Aug 2009, Phlip wrote:
> > tomrossi7 wrote: > >> Now you can see why I posted this for discussion. Two voices in my head >> (1) put it in the model and use dumb controllers (2) emails are related to >> user interaction logic and belong in the controller. > > Which is easier to test? I'm very wary of using ease of testing as a criterion for this kind of application design decision. Ease of testing generally has to do with the state of testing tools, as well as some potentially very divergent views on what makes for "easy" testing. In the case of the ActionMailer question, I don't think either is easier. In both scenarios the test mode of ActionMailer will append the message to AM::Base.deliveries, where it can be examined. Or you can just write unit tests for the mailer itself, and then use a mock mailer in the controller and/or User model tests. David -- David A. Black / Ruby Power and Light, LLC / http://www.rubypal.com Q: What's the best way to get a really solid knowledge of Ruby? A: Come to our Ruby training in Edison, New Jersey, September 14-17! Instructors: David A. Black and Erik Kastner More info and registration: http://rubyurl.com/vmzN --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

