diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-08-16 21:14:26 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-08-16 21:14:26 -0500 |
commit | 24ad9ae3d228acdf9aa31cf28bfe6dfb0139c247 (patch) | |
tree | 8328606506d2db378a35905a0953b59b0e84cfdf /actionpack/test/controller/render_test.rb | |
parent | ccf28d2499d1b4e2aba41291eb800e0e02120923 (diff) | |
download | rails-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_test.rb')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 9c5b560c2c..abcc8bf384 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -1086,15 +1086,17 @@ class RenderTest < ActionController::TestCase end def test_head_with_location_object - 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 :head_with_location_object - assert @response.body.blank? - assert_equal "http://www.nextangle.com/customers/1", @response.headers["Location"] - assert_response :ok + get :head_with_location_object + assert @response.body.blank? + assert_equal "http://www.nextangle.com/customers/1", @response.headers["Location"] + assert_response :ok + end end def test_head_with_custom_header |