aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2012-05-09 11:48:33 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2012-05-09 11:53:15 +0100
commitbeea9f5d4eb96a6d13863a403ce100ae9710259a (patch)
treed731fc73fc76586f24cbf70c845063e816723214 /actionpack/test/dispatch/routing_test.rb
parente154823935859ae918ca26a7e73477d331e4a142 (diff)
downloadrails-beea9f5d4eb96a6d13863a403ce100ae9710259a.tar.gz
rails-beea9f5d4eb96a6d13863a403ce100ae9710259a.tar.bz2
rails-beea9f5d4eb96a6d13863a403ce100ae9710259a.zip
Refactor Generator class to not rely on in-place editing the controller
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 6d0cfe9b8a..d356187ca8 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -829,13 +829,13 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal original_options, options
end
- # checks that url_for doesn't change controller and action
- def test_url_for_with_no_side_effects_on_strings
- # freeze controller and action to be sure they are not changed
- # we'll get RuntimeError if somebody tries to modify them
- options = {:controller => '/projects'.freeze, :action => 'status'.freeze}
+ def test_url_for_does_not_modify_controller
+ controller = '/projects'
+ options = {:controller => controller, :action => 'status', :only_path => true}
+ url = url_for(options)
- url_for options
+ assert_equal '/projects/status', url
+ assert_equal '/projects', controller
end
# tests the arguments modification free version of define_hash_access