diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-03-09 20:50:35 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-03-09 20:50:35 -0600 |
commit | 7db80f87e9c194713c2016820e39af6043ddf8d0 (patch) | |
tree | 310fb27f2831a8fcf1598f4522e28e236f5d8172 /actionpack/test/controller | |
parent | a87683fb38d6cf66f39a7bd3faa6c969c63b1f46 (diff) | |
download | rails-7db80f87e9c194713c2016820e39af6043ddf8d0.tar.gz rails-7db80f87e9c194713c2016820e39af6043ddf8d0.tar.bz2 rails-7db80f87e9c194713c2016820e39af6043ddf8d0.zip |
Move AC::UrlRewriter onto route set
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 5 | ||||
-rw-r--r-- | actionpack/test/controller/url_rewriter_test.rb | 5 |
2 files changed, 3 insertions, 7 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index 2be91893d4..08efd5a48c 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -64,7 +64,6 @@ class PageCachingTest < ActionController::TestCase @controller.cache_store = :file_store, FILE_STORE_PATH @params = {:controller => 'posts', :action => 'index', :only_path => true, :skip_relative_url_root => true} - @rewriter = ActionController::UrlRewriter FileUtils.rm_rf(File.dirname(FILE_STORE_PATH)) FileUtils.mkdir_p(FILE_STORE_PATH) @@ -82,9 +81,9 @@ class PageCachingTest < ActionController::TestCase match '/', :to => 'posts#index', :as => :main end @params[:format] = 'rss' - assert_equal '/posts.rss', @rewriter.rewrite(@router, @params) + assert_equal '/posts.rss', @router.rewrite(@params) @params[:format] = nil - assert_equal '/', @rewriter.rewrite(@router, @params) + assert_equal '/', @router.rewrite(@params) end end diff --git a/actionpack/test/controller/url_rewriter_test.rb b/actionpack/test/controller/url_rewriter_test.rb index 3bc8bec3fb..cf775846df 100644 --- a/actionpack/test/controller/url_rewriter_test.rb +++ b/actionpack/test/controller/url_rewriter_test.rb @@ -1,8 +1,6 @@ require 'abstract_unit' require 'controller/fake_controllers' -ActionController::UrlRewriter - class UrlRewriterTests < ActionController::TestCase class Rewriter def initialize(request) @@ -13,8 +11,7 @@ class UrlRewriterTests < ActionController::TestCase end def rewrite(router, options) - options = @options.merge(options) - ActionController::UrlRewriter.rewrite(router, options) + router.rewrite(@options.merge(options)) end end |