diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-03 23:31:38 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-03 23:31:38 -0500 |
commit | 86ed58d9121844e2d881be67e2d845ae721f72e7 (patch) | |
tree | ea670adc7da8b04d21d8a644db2ce619ea771dbe /actionpack/test/controller/verification_test.rb | |
parent | 61411f2aeb29edba2d8cd2008020044799ea3d61 (diff) | |
download | rails-86ed58d9121844e2d881be67e2d845ae721f72e7.tar.gz rails-86ed58d9121844e2d881be67e2d845ae721f72e7.tar.bz2 rails-86ed58d9121844e2d881be67e2d845ae721f72e7.zip |
Use with_routing helper in tests instead of modifying global route set
Diffstat (limited to 'actionpack/test/controller/verification_test.rb')
-rw-r--r-- | actionpack/test/controller/verification_test.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/actionpack/test/controller/verification_test.rb b/actionpack/test/controller/verification_test.rb index ee558f3465..1a9eb65f29 100644 --- a/actionpack/test/controller/verification_test.rb +++ b/actionpack/test/controller/verification_test.rb @@ -111,13 +111,6 @@ class VerificationTest < ActionController::TestCase tests TestController - setup do - ActionController::Routing::Routes.draw do |map| - map.foo '/foo', :controller => 'test', :action => 'foo' - map.connect ":controller/:action/:id" - end - end - def test_using_symbol_back_with_no_referrer assert_raise(ActionController::RedirectBackError) { get :guarded_with_back } end @@ -130,8 +123,14 @@ class VerificationTest < ActionController::TestCase def test_no_deprecation_warning_for_named_route assert_not_deprecated do - get :guarded_one_for_named_route_test, :two => "not one" - assert_redirected_to '/foo' + with_routing do |set| + set.draw do |map| + map.foo '/foo', :controller => 'test', :action => 'foo' + map.connect ":controller/:action/:id" + end + get :guarded_one_for_named_route_test, :two => "not one" + assert_redirected_to '/foo' + end end end |