diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-02-24 16:17:04 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-02-25 17:53:01 -0800 |
commit | a278f2331007411b190d65577082d2710ad9a996 (patch) | |
tree | 6350fa8b723e57d57f7ddda7c812de7ad9fda260 /actionpack | |
parent | 4b038f638d8c8969b2bccac82d0d7a370381680b (diff) | |
download | rails-a278f2331007411b190d65577082d2710ad9a996.tar.gz rails-a278f2331007411b190d65577082d2710ad9a996.tar.bz2 rails-a278f2331007411b190d65577082d2710ad9a996.zip |
Fix all of AP's tests with the non global router
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/activerecord/polymorphic_routes_test.rb | 6 | ||||
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/test/activerecord/polymorphic_routes_test.rb b/actionpack/test/activerecord/polymorphic_routes_test.rb index 7be2ef7e29..a10bb4473e 100644 --- a/actionpack/test/activerecord/polymorphic_routes_test.rb +++ b/actionpack/test/activerecord/polymorphic_routes_test.rb @@ -400,7 +400,7 @@ class PolymorphicRoutesTest < ActionController::TestCase map.resources :series end - ActionDispatch::Routing::Routes.install_helpers(self.class) + self.class.send(:include, @router.named_url_helpers) yield end end @@ -422,7 +422,7 @@ class PolymorphicRoutesTest < ActionController::TestCase end end - ActionDispatch::Routing::Routes.install_helpers(self.class) + self.class.send(:include, @router.named_url_helpers) yield end end @@ -441,7 +441,7 @@ class PolymorphicRoutesTest < ActionController::TestCase end end - ActionDispatch::Routing::Routes.install_helpers(self.class) + self.class.send(:include, @router.named_url_helpers) yield end end diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index de92fc56fd..9c9d886f5d 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -74,9 +74,9 @@ class PageCachingTest < ActionController::TestCase match '/', :to => 'posts#index', :as => :main end @params[:format] = 'rss' - assert_equal '/posts.rss', @rewriter.rewrite(@params) + assert_equal '/posts.rss', @rewriter.rewrite(@router, @params) @params[:format] = nil - assert_equal '/', @rewriter.rewrite(@params) + assert_equal '/', @rewriter.rewrite(@router, @params) end end @@ -511,6 +511,8 @@ class ActionCacheTest < ActionController::TestCase @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @controller = ActionCachingTestController.new + # ROUTES TODO: It seems bad to explicitly remix in the class + @controller.metaclass.send(:include, @router.named_url_helpers) @request.host = 'hostname.com' end |