[WIP] Unify controller and integration tests

This pull request is for the following project: https://github.com/rails/gsoc2014/wiki/Ideas#unify-controller-and-integration-tests
Ah ok I misunderstood how the QUERY_STRING, am working on a solution now.