diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-03-30 14:05:42 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-03-30 14:05:42 -0500 |
commit | cdf8c35ffdfb39f4de4b030576b1abb06c482668 (patch) | |
tree | 16f3973a7f844aa3e55c72c26ba9266c24a6fa72 /actionpack/lib/action_controller/test_case.rb | |
parent | 17f0c1e9e8a5bfa7c4d2e1632c3b8b91f4678f03 (diff) | |
download | rails-cdf8c35ffdfb39f4de4b030576b1abb06c482668.tar.gz rails-cdf8c35ffdfb39f4de4b030576b1abb06c482668.tar.bz2 rails-cdf8c35ffdfb39f4de4b030576b1abb06c482668.zip |
Consistent routing language
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 306db4a431..2d4cf2fafb 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -118,9 +118,9 @@ module ActionController end end - def assign_parameters(router, controller_path, action, parameters = {}) + def assign_parameters(routes, controller_path, action, parameters = {}) parameters = parameters.symbolize_keys.merge(:controller => controller_path, :action => action) - extra_keys = router.extra_keys(parameters) + extra_keys = routes.extra_keys(parameters) non_path_parameters = get? ? query_parameters : request_parameters parameters.each do |key, value| if value.is_a? Fixnum @@ -322,7 +322,7 @@ module ActionController def process(action, parameters = nil, session = nil, flash = nil, http_method = 'GET') # Sanity check for required instance variables so we can give an # understandable error message. - %w(@router @controller @request @response).each do |iv_name| + %w(@routes @controller @request @response).each do |iv_name| if !(instance_variable_names.include?(iv_name) || instance_variable_names.include?(iv_name.to_sym)) || instance_variable_get(iv_name).nil? raise "#{iv_name} is nil: make sure you set it in your test's setup method." end @@ -338,7 +338,7 @@ module ActionController @request.env['REQUEST_METHOD'] = http_method parameters ||= {} - @request.assign_parameters(@router, @controller.class.name.underscore.sub(/_controller$/, ''), action.to_s, parameters) + @request.assign_parameters(@routes, @controller.class.name.underscore.sub(/_controller$/, ''), action.to_s, parameters) @request.session = ActionController::TestSession.new(session) unless session.nil? @request.session["flash"] = @request.flash.update(flash || {}) @@ -447,7 +447,7 @@ module ActionController :relative_url_root => nil, :_path_segments => @request.symbolized_path_parameters) - url, query_string = @router.url_for(options).split("?", 2) + url, query_string = @routes.url_for(options).split("?", 2) @request.env["SCRIPT_NAME"] = @controller.config.relative_url_root @request.env["PATH_INFO"] = url |