[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
The `action_controller.instance` will cause an error to be raised when calling `to_json` on it. This is also true for `@request.headers.env` for Integration test