From b3eb26a161acb23781e55fc6c37b948f160cd9b5 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Thu, 5 Aug 2010 15:44:23 +0200 Subject: Removed deprecated RouteSet API, still many tests fail --- actionpack/test/template/atom_feed_helper_test.rb | 2 +- actionpack/test/template/test_case_test.rb | 4 ++-- actionpack/test/template/test_test.rb | 2 +- actionpack/test/template/url_helper_test.rb | 5 ++--- 4 files changed, 6 insertions(+), 7 deletions(-) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/atom_feed_helper_test.rb b/actionpack/test/template/atom_feed_helper_test.rb index fb43a8f960..9f0a975255 100644 --- a/actionpack/test/template/atom_feed_helper_test.rb +++ b/actionpack/test/template/atom_feed_helper_test.rb @@ -314,7 +314,7 @@ class AtomFeedTest < ActionController::TestCase private def with_restful_routing(resources) with_routing do |set| - set.draw do |map| + set.draw do resources(resources) end yield diff --git a/actionpack/test/template/test_case_test.rb b/actionpack/test/template/test_case_test.rb index a0c46f8a59..eaa0c54f5a 100644 --- a/actionpack/test/template/test_case_test.rb +++ b/actionpack/test/template/test_case_test.rb @@ -172,7 +172,7 @@ module ActionView test "is able to use named routes" do with_routing do |set| - set.draw { |map| resources :contents } + set.draw { resources :contents } assert_equal 'http://test.host/contents/new', new_content_url assert_equal 'http://test.host/contents/1', content_url(:id => 1) end @@ -180,7 +180,7 @@ module ActionView test "named routes can be used from helper included in view" do with_routing do |set| - set.draw { |map| resources :contents } + set.draw { resources :contents } _helpers.module_eval do def render_from_helper new_content_url diff --git a/actionpack/test/template/test_test.rb b/actionpack/test/template/test_test.rb index 20c96824d6..3d0bbba435 100644 --- a/actionpack/test/template/test_test.rb +++ b/actionpack/test/template/test_test.rb @@ -47,7 +47,7 @@ class PeopleHelperTest < ActionView::TestCase private def with_test_route_set with_routing do |set| - set.draw do |map| + set.draw do match 'people', :to => 'people#index', :as => :people end yield diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index b76813c554..db8fd82aeb 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -394,7 +394,7 @@ end class UrlHelperControllerTest < ActionController::TestCase class UrlHelperController < ActionController::Base - test_routes do |map| + test_routes do match 'url_helper_controller_test/url_helper/show/:id', :to => 'url_helper_controller_test/url_helper#show', :as => :show @@ -407,8 +407,7 @@ class UrlHelperControllerTest < ActionController::TestCase :to => 'url_helper_controller_test/url_helper#show_named_route', :as => :show_named_route - map.connect ":controller/:action/:id" - # match "/:controller(/:action(/:id))" + match "/:controller(/:action(/:id))" match 'url_helper_controller_test/url_helper/normalize_recall_params', :to => UrlHelperController.action(:normalize_recall), -- cgit v1.2.3