Skip to content

Commit

Permalink
Merge pull request #11146 from kennyj/re-remove-deprecated-api
Browse files Browse the repository at this point in the history
Re-remove deprecated API.
  • Loading branch information
rafaelfranca committed Jun 27, 2013
2 parents 463c08d + db0499a commit 90f0014
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
12 changes: 0 additions & 12 deletions actionpack/lib/action_controller/test_case.rb
Expand Up @@ -524,7 +524,6 @@ def paramify_values(hash_or_array_or_value)

def process(action, http_method = 'GET', *args)
check_required_ivars
http_method, args = handle_old_process_api(http_method, args, caller)

if args.first.is_a?(String) && http_method != 'HEAD'
@request.env['RAW_POST_DATA'] = args.shift
Expand Down Expand Up @@ -628,17 +627,6 @@ def check_required_ivars
end
end

def handle_old_process_api(http_method, args, callstack)
# 4.0: Remove this method.
if http_method.is_a?(Hash)
ActiveSupport::Deprecation.warn("TestCase#process now expects the HTTP method as second argument: process(action, http_method, params, session, flash)", callstack)
args.unshift(http_method)
http_method = args.last.is_a?(String) ? args.last : "GET"
end

[http_method, args]
end

def build_request_uri(action, parameters)
unless @request.env["PATH_INFO"]
options = @controller.respond_to?(:url_options) ? @controller.__send__(:url_options).merge(parameters) : parameters
Expand Down
7 changes: 0 additions & 7 deletions actionpack/test/controller/test_case_test.rb
Expand Up @@ -280,13 +280,6 @@ def test_process_with_request_uri_with_params
assert_equal "/test_case_test/test/test_uri/7", @response.body
end

def test_process_with_old_api
assert_deprecated do
process :test_uri, :id => 7
assert_equal "/test_case_test/test/test_uri/7", @response.body
end
end

def test_process_with_request_uri_with_params_with_explicit_uri
@request.env['PATH_INFO'] = "/explicit/uri"
process :test_uri, "GET", :id => 7
Expand Down

0 comments on commit 90f0014

Please sign in to comment.