aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/integration_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/integration_test.rb')
-rw-r--r--actionpack/test/controller/integration_test.rb17
1 files changed, 12 insertions, 5 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index 197ba0c69c..508364d0b5 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,20 +364,22 @@ 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|
set.draw do |map|
- map.with_options :controller => "IntegrationProcessTest::Integration" do |c|
- c.connect "/:action"
- end
+ map.connect "/:action", :controller => "integration_process_test/integration"
end
yield
end
end
end
-class MetalTest < ActionController::IntegrationTest
+class MetalIntegrationTest < ActionController::IntegrationTest
class Poller
def self.call(env)
if env["PATH_INFO"] =~ /^\/success/
@@ -388,7 +391,7 @@ class MetalTest < ActionController::IntegrationTest
end
def setup
- @integration_session = ActionController::Integration::Session.new(Poller)
+ @app = Poller
end
def test_successful_get
@@ -405,4 +408,8 @@ class MetalTest < 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