aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_dispatch/testing/integration.rb2
-rw-r--r--actionpack/test/controller/integration_test.rb9
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