diff options
author | Xavier Noria <fxn@hashref.com> | 2010-03-31 07:47:58 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-03-31 07:47:58 -0700 |
commit | 824fa10f4d1306cc1e310a7d5de7e95cfb07d6f8 (patch) | |
tree | 1967c2a945d6e131d467fb4f0178a0f60e01ae8a /actionpack/test/controller/resources_test.rb | |
parent | 1ed1652bef981d9402797b6cb9f0920a40eea21a (diff) | |
parent | db28d407f76a790a31e27bf51560e23425dd6944 (diff) | |
download | rails-824fa10f4d1306cc1e310a7d5de7e95cfb07d6f8.tar.gz rails-824fa10f4d1306cc1e310a7d5de7e95cfb07d6f8.tar.bz2 rails-824fa10f4d1306cc1e310a7d5de7e95cfb07d6f8.zip |
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/test/controller/resources_test.rb')
-rw-r--r-- | actionpack/test/controller/resources_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index 17c645c04c..a9d1c55c05 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -126,7 +126,7 @@ class ResourcesTest < ActionController::TestCase def test_with_custom_conditions with_restful_routing :messages, :conditions => { :subdomain => 'app' } do - assert @router.recognize_path("/messages", :method => :get, :subdomain => 'app') + assert @routes.recognize_path("/messages", :method => :get, :subdomain => 'app') end end @@ -395,7 +395,7 @@ class ResourcesTest < ActionController::TestCase assert_restful_routes_for :messages do |options| assert_recognizes(options.merge(:action => "new"), :path => "/messages/new", :method => :get) assert_raise(ActionController::RoutingError) do - @router.recognize_path("/messages/new", :method => :post) + @routes.recognize_path("/messages/new", :method => :post) end end end @@ -505,7 +505,7 @@ class ResourcesTest < ActionController::TestCase def test_restful_routes_dont_generate_duplicates with_restful_routing :messages do - routes = @router.routes + routes = @routes.routes routes.each do |route| routes.each do |r| next if route === r # skip the comparison instance @@ -1169,8 +1169,8 @@ class ResourcesTest < ActionController::TestCase options[:shallow_options] = options[:options] end - new_action = @router.resources_path_names[:new] || "new" - edit_action = @router.resources_path_names[:edit] || "edit" + new_action = @routes.resources_path_names[:new] || "new" + edit_action = @routes.resources_path_names[:edit] || "edit" if options[:path_names] new_action = options[:path_names][:new] if options[:path_names][:new] @@ -1237,7 +1237,7 @@ class ResourcesTest < ActionController::TestCase end @controller = "#{options[:options][:controller].camelize}Controller".constantize.new - @controller.singleton_class.send(:include, @router.url_helpers) + @controller.singleton_class.send(:include, @routes.url_helpers) @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new get :index, options[:options] @@ -1307,7 +1307,7 @@ class ResourcesTest < ActionController::TestCase def assert_singleton_named_routes_for(singleton_name, options = {}) (options[:options] ||= {})[:controller] ||= singleton_name.to_s.pluralize @controller = "#{options[:options][:controller].camelize}Controller".constantize.new - @controller.singleton_class.send(:include, @router.url_helpers) + @controller.singleton_class.send(:include, @routes.url_helpers) @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new get :show, options[:options] |