aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/test_test.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-03-12 16:00:01 +0000
committerPratik Naik <pratiknaik@gmail.com>2010-03-12 16:00:01 +0000
commite68bfaf1fe1a7890a67af6f444281185f507cf9e (patch)
tree5e73caccdcdd65d0ac97f9eb92195928f30925f2 /actionpack/test/controller/test_test.rb
parentef6462c73003b28c8e060a06120abb9cd67b6d52 (diff)
parent16846553b8866eab2aa3b128a2a23a221a25f7e3 (diff)
downloadrails-e68bfaf1fe1a7890a67af6f444281185f507cf9e.tar.gz
rails-e68bfaf1fe1a7890a67af6f444281185f507cf9e.tar.bz2
rails-e68bfaf1fe1a7890a67af6f444281185f507cf9e.zip
Merge remote branch 'mainstream/master'
Conflicts: activerecord/lib/active_record/base.rb railties/lib/rails/configuration.rb railties/lib/rails/log_subscriber.rb
Diffstat (limited to 'actionpack/test/controller/test_test.rb')
-rw-r--r--actionpack/test/controller/test_test.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb
index 0f074b32e6..f6ba275849 100644
--- a/actionpack/test/controller/test_test.rb
+++ b/actionpack/test/controller/test_test.rb
@@ -42,7 +42,7 @@ class TestTest < ActionController::TestCase
end
def test_uri
- render :text => request.request_uri
+ render :text => request.fullpath
end
def test_query_string
@@ -128,6 +128,7 @@ XML
@controller = TestController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
+ @request.env['PATH_INFO'] = nil
end
def test_raw_post_handling
@@ -199,7 +200,7 @@ XML
end
def test_process_with_request_uri_with_params_with_explicit_uri
- @request.request_uri = "/explicit/uri"
+ @request.env['PATH_INFO'] = "/explicit/uri"
process :test_uri, :id => 7
assert_equal "/explicit/uri", @response.body
end
@@ -210,7 +211,8 @@ XML
end
def test_process_with_query_string_with_explicit_uri
- @request.request_uri = "/explicit/uri?q=test?extra=question"
+ @request.env['PATH_INFO'] = '/explicit/uri'
+ @request.env['QUERY_STRING'] = 'q=test?extra=question'
process :test_query_string
assert_equal "q=test?extra=question", @response.body
end
@@ -476,8 +478,8 @@ XML
end
def test_with_routing_places_routes_back
- assert ActionController::Routing::Routes
- routes_id = ActionController::Routing::Routes.object_id
+ assert @router
+ routes_id = @router.object_id
begin
with_routing { raise 'fail' }
@@ -485,8 +487,8 @@ XML
rescue RuntimeError
end
- assert ActionController::Routing::Routes
- assert_equal routes_id, ActionController::Routing::Routes.object_id
+ assert @router
+ assert_equal routes_id, @router.object_id
end
def test_remote_addr