Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removing implicit check for controller name. Will make explicit test …

…soon
  • Loading branch information...
commit 10efd7492f462334b93625bb5aab674cee38947c 1 parent 4f2c4b3
@gus gus authored
View
8 lib/riot/action_controller/http_methods.rb
@@ -11,13 +11,7 @@ def get(uri, params={}, &block)
http_reset
@env = ::Rack::MockRequest.env_for(uri, {:params => params})
@env['action_dispatch.show_exceptions'] = false
- returning(@app.call(@env)) do |call_response|
- c = @env["action_controller.instance"]
- unless c.class.controller_name == topic.controller_name
- msg = "Expected #{topic.controller_name} controller, not #{c.class.controller_name}"
- raise ControllerMismatch, msg
- end
- end
+ @app.call(@env)
end
def post; raise Exception, "POST isn't ready yet"; end
View
4 test/action_controller/get_request_test.rb
@@ -6,10 +6,6 @@
get "/rooms/blah"
end.raises(AbstractController::ActionNotFound, "The action 'blah' could not be found")
- asserts("controller does not match the one under test") do
- get "/gremlins"
- end.raises(RiotRails::ActionController::ControllerMismatch, "Expected rooms controller, not gremlins")
-
context "for a GET request" do
helper(:action_name) { env['action_dispatch.request.path_parameters'][:action] }

0 comments on commit 10efd74

Please sign in to comment.
Something went wrong with that request. Please try again.