diff options
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/action_pack_assertions_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index e4624484ec..1aefbfd677 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -209,7 +209,7 @@ class ActionPackAssertionsControllerTest < Test::Unit::TestCase map.route_one 'route_one', :controller => 'action_pack_assertions', :action => 'nothing' map.connect ':controller/:action/:id' end - set.named_routes.install + set.install_helpers process :redirect_to_named_route assert_redirected_to 'http://test.host/route_one' 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 |