aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/render_xml_test.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-08-16 21:14:26 -0500
committerJoshua Peek <josh@joshpeek.com>2009-08-16 21:14:26 -0500
commit24ad9ae3d228acdf9aa31cf28bfe6dfb0139c247 (patch)
tree8328606506d2db378a35905a0953b59b0e84cfdf /actionpack/test/controller/render_xml_test.rb
parentccf28d2499d1b4e2aba41291eb800e0e02120923 (diff)
downloadrails-24ad9ae3d228acdf9aa31cf28bfe6dfb0139c247.tar.gz
rails-24ad9ae3d228acdf9aa31cf28bfe6dfb0139c247.tar.bz2
rails-24ad9ae3d228acdf9aa31cf28bfe6dfb0139c247.zip
Cleanup route reloading in tests. Prefer with_routing over using ActionController::Routing::Routes directly
Diffstat (limited to 'actionpack/test/controller/render_xml_test.rb')
-rw-r--r--actionpack/test/controller/render_xml_test.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/actionpack/test/controller/render_xml_test.rb b/actionpack/test/controller/render_xml_test.rb
index 139f55d8bd..e96e8a4d57 100644
--- a/actionpack/test/controller/render_xml_test.rb
+++ b/actionpack/test/controller/render_xml_test.rb
@@ -55,13 +55,15 @@ class RenderTest < ActionController::TestCase
end
def test_rendering_with_object_location_should_set_header_with_url_for
- ActionController::Routing::Routes.draw do |map|
- map.resources :customers
- map.connect ':controller/:action/:id'
- end
+ with_routing do |set|
+ set.draw do |map|
+ map.resources :customers
+ map.connect ':controller/:action/:id'
+ end
- get :render_with_object_location
- assert_equal "http://www.nextangle.com/customers/1", @response.headers["Location"]
+ get :render_with_object_location
+ assert_equal "http://www.nextangle.com/customers/1", @response.headers["Location"]
+ end
end
def test_should_render_formatted_xml_erb_template