ActiveResource, FakeWeb & Regex Mojo (authenticated edition)
Have a web service which needs requires authentication, but you’re testing a completely different part of the application? Again, FakeWeb & Regex help you out here. If you’re testing a model extended from ActiveResource by using FakeWeb, the url will look something like this: 1http://user:pass@example.com/someService To mock the request, use a regular expression like so: [...]