On Tue, Jan 5, 2010 at 2:53 PM, Phillip Koebbe <phillipkoe...@gmail.com>wrote:
> Subclass it in your spec with >> >> class TestController < Admin::BaseController >> def index >> end >> end >> >> ...then use the TestController in your tests for Admin::BaseController. >> >> That might mean you'll need to add special routing for TestController >> which is annoying but can be done. >> > > Thanks, Matt. Between your post and David's, I'll see if I can put it all > together. > Phillip - one thing to keep in mind is that subclasses can always override super class behaviour. So on the one hand, we want to minimize duplication and only spec one thing once. On the other hand, if we're spec'ing that every controller should behave some way, we should spec every controller. I'm not advocating one approach or the other, just pointing out a couple of costs/benefits. > > Peace, > > Phillip > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users