lib/action_controller/assertions/response_assertions.rb in actionpack-1.13.3 vs lib/action_controller/assertions/response_assertions.rb in actionpack-1.13.4
- old
+ new
@@ -118,10 +118,11 @@
end
end
end
private
+ # Recognizes the route for a given path.
def recognized_request_for(path, request_method = nil)
path = "/#{path}" unless path.first == '/'
# Assume given controller
request = ActionController::TestRequest.new({}, {}, nil)
@@ -130,9 +131,10 @@
ActionController::Routing::Routes.recognize(request)
request
end
+ # Proxy to to_param if the object will respond to it.
def parameterize(value)
value.respond_to?(:to_param) ? value.to_param : value
end
end
end