diff options
author | Arthur Nogueira Neves <github@arthurnn.com> | 2016-05-05 17:12:25 -0500 |
---|---|---|
committer | Arthur Nogueira Neves <github@arthurnn.com> | 2016-05-05 17:12:25 -0500 |
commit | 58a221278897a66bf8b9c909389da40ac2c5e534 (patch) | |
tree | 72d117720d93e0cb2ae126b9c697b040562689bd /actionpack/test | |
parent | 1949412a868ccf5addc12b7569f6ebbf4b6488e4 (diff) | |
parent | 541a51ecf8ee04f956b7d8efb13935640aa831ce (diff) | |
download | rails-58a221278897a66bf8b9c909389da40ac2c5e534.tar.gz rails-58a221278897a66bf8b9c909389da40ac2c5e534.tar.bz2 rails-58a221278897a66bf8b9c909389da40ac2c5e534.zip |
Merge pull request #24866 from rafaelfranca/actionview-helpers
Implement helpers proxy in controller instance level
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/helper_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index feb882a2b3..ef85e141a0 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -207,6 +207,22 @@ class HelperTest < ActiveSupport::TestCase assert methods.include?(:foobar) end + def test_helper_proxy_in_instance + methods = AllHelpersController.new.helpers.methods + + # Action View + assert_includes methods, :pluralize + + # abc_helper.rb + assert_includes methods, :bare_a + + # fun/games_helper.rb + assert_includes methods, :stratego + + # fun/pdf_helper.rb + assert_includes methods, :foobar + end + def test_helper_proxy_config AllHelpersController.config.my_var = 'smth' |