I am writing a functional test for a controller. The problem I have is
that a before filter defined in ApplicationController is hit and I don’t
know how to stub it.
I tried controller.expects(:find_site).returns(@site) but it fails as
controller is unknown method.
I tried ApplicationController.expects(:find_site).returns(@site) but the
assertion fails as it never happens. So how do I deal with that?