diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-09-25 11:10:39 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-09-25 11:10:39 -0500 |
commit | 088ce2904d63d15979de561b913e3e88e656f3fa (patch) | |
tree | 701b90beea5e5890ed47c76800df88f6feee3cda /actionpack | |
parent | 24ac3a8d8eb6f66392961eb2cc89c8b244f04238 (diff) | |
download | rails-088ce2904d63d15979de561b913e3e88e656f3fa.tar.gz rails-088ce2904d63d15979de561b913e3e88e656f3fa.tar.bz2 rails-088ce2904d63d15979de561b913e3e88e656f3fa.zip |
Fix generic url rewriter in integration tests
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/integration_test.rb | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 3f19a2560a..f344c1b572 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -295,7 +295,7 @@ module ActionDispatch "SERVER_PORT" => https? ? "443" : "80", "HTTPS" => https? ? "on" : "off" } - UrlRewriter.new(ActionDispatch::Request.new(env), {}) + ActionController::UrlRewriter.new(ActionDispatch::Request.new(env), {}) end end diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index 9f56bbfd46..61668b72f1 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'controller/fake_controllers' require 'action_controller/vendor/html-scanner' class SessionTest < Test::Unit::TestCase @@ -363,6 +364,10 @@ class IntegrationProcessTest < ActionController::IntegrationTest end end + def test_generate_url_with_controller + assert_equal 'http://www.example.com/foo', url_for(:controller => "foo") + end + private def with_test_route_set with_routing do |set| @@ -406,4 +411,8 @@ class MetalIntegrationTest < ActionController::IntegrationTest assert_response :not_found assert_equal '', response.body end + + def test_generate_url_without_controller + assert_equal 'http://www.example.com/foo', url_for(:controller => "foo") + end end |