GRRRRRRRRRR!
In my version of the trunk I’m working against, r5299, I had to do this to mock out RedirectToReferrer. I think it’s been changed in recent commits, I’m not sure.
[TestFixture] public class LoginControllerTests : GenericBaseControllerTest<LoginController> { private string referrer = "http://www.example.org"; protected override IMockRequest BuildRequest() { var request = new StubRequest(Cookies); request.UrlReferrer = referrer; return request; } protected override IMockResponse BuildResponse(UrlInfo info) { var response = new StubResponse(info, new DefaultUrlBuilder(), new StubServerUtility(), new RouteMatch(), referrer); return response; }
etc. etc.
It’s oddly the Response that you need to molest to get the RedirectToReferrer to work. I had to crawl around in the monorail sources to figure it out.
Cheers!