On Nov 2, 2007 5:59 PM, Steve <[EMAIL PROTECTED]> wrote: > Is there an easy way to spec that a controller should include helpers > other than its own? I was thinking I could just spec responds_to for > methods I'm interested in in the view, but that seems like crossing a > separation boundary, that the controller maybe doesn't need to know about?
FWIW, by asking you to declare helpers in controllers so that views can access their goodness, Rails is already forcing you to cross that boundary. So whatever you do here is a compromise and you just need to find the lesser of evils. I think the most pragmatic thing to do would be to use a controller spec with integrate_views and describe what the view should look like when it uses one of the included methods. Alternatively could load the file and expect the declaration (but that's somewhat controversial on this list). HTH, David _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users