aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-08-16 00:59:59 +0100
committerJon Leighton <j@jonathanleighton.com>2011-08-16 00:59:59 +0100
commit6c5f67cac15c43bafcd917c346cccfcf3fa5fb95 (patch)
tree6932752930fcc50e6799024b32d6dbc4bdd7670b /actionpack/test/controller
parent03a045b306768e12bb0f1480040aa9e93e8d6338 (diff)
downloadrails-6c5f67cac15c43bafcd917c346cccfcf3fa5fb95.tar.gz
rails-6c5f67cac15c43bafcd917c346cccfcf3fa5fb95.tar.bz2
rails-6c5f67cac15c43bafcd917c346cccfcf3fa5fb95.zip
Don't refer to ActionController::Base in the wrap_parameters initializer - use config object instead. Cuts about 15% off the load time. (#734)
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/params_wrapper_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/params_wrapper_test.rb b/actionpack/test/controller/params_wrapper_test.rb
index 7bef1e8d5d..e1914cf894 100644
--- a/actionpack/test/controller/params_wrapper_test.rb
+++ b/actionpack/test/controller/params_wrapper_test.rb
@@ -180,6 +180,13 @@ class ParamsWrapperTest < ActionController::TestCase
assert_parameters({ 'username' => 'sikachu', 'title' => 'Developer', 'user' => { 'username' => 'sikachu', 'title' => 'Developer' }})
end
end
+
+ def test_assignment_alias
+ with_default_wrapper_options do
+ UsersController.wrap_parameters = { :format => [:foo] }
+ assert_equal({ :format => [:foo], :name => "user" }, UsersController._wrapper_options)
+ end
+ end
end
class NamespacedParamsWrapperTest < ActionController::TestCase