HttpMock is great to test the client side of a REST API. But if you’re responsible for client and server side of the API, it makes sense to do full end-to-end tests from your application’s controllers to the client app. Up to now, you’d need to set up a local server to end-to-end-test the ActiveResource requests from the client app against.

Instead, I’d like to just use Rails’ integration test infrastructure. All ActiveResource requests can be directly routed to the app’s controller, just as known from integration tests. This is how tests could then look like: