aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2007-05-12 04:18:46 +0000
committerNicholas Seckar <nseckar@gmail.com>2007-05-12 04:18:46 +0000
commita5fe13e871506e242071a6b0d0d96d1d9a78469a (patch)
tree852d5682acd7312f40092ecb9af547117319c799 /actionpack/test/controller/routing_test.rb
parenta722b480008c0609c08e20d4286dd1c1af00823c (diff)
downloadrails-a5fe13e871506e242071a6b0d0d96d1d9a78469a.tar.gz
rails-a5fe13e871506e242071a6b0d0d96d1d9a78469a.tar.bz2
rails-a5fe13e871506e242071a6b0d0d96d1d9a78469a.zip
Add ActionController::Routing::Helpers, a module to contain common URL helpers such as polymorphic_url.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6722 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r--actionpack/test/controller/routing_test.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 986737c4dc..658059cefe 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -207,7 +207,7 @@ class LegacyRouteSetTests < Test::Unit::TestCase
def setup_for_named_route
x = Class.new
x.send(:define_method, :url_for) {|x| x}
- rs.named_routes.install(x)
+ rs.install_helpers(x)
x
end
@@ -1417,7 +1417,7 @@ class RouteSetTest < Test::Unit::TestCase
end
klass = Class.new(MockController)
- set.named_routes.install(klass)
+ set.install_helpers(klass)
klass.new(set)
end
@@ -1885,4 +1885,14 @@ class RoutingTest < Test::Unit::TestCase
assert_equal %w(vendor\\rails\\railties\\builtin\\rails_info vendor\\rails\\actionpack\\lib app\\controllers app\\helpers app\\models lib .), paths
end
+ def test_routing_helper_module
+ assert_kind_of Module, ActionController::Routing::Helpers
+
+ h = ActionController::Routing::Helpers
+ c = Class.new
+ assert ! c.ancestors.include?(h)
+ ActionController::Routing::Routes.install_helpers c
+ assert c.ancestors.include?(h)
+ end
+
end