aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJosh Peek <josh@joshpeek.com>2008-04-06 18:42:34 +0000
committerJosh Peek <josh@joshpeek.com>2008-04-06 18:42:34 +0000
commit917423d664038d6791738a73ad1446437dbb71df (patch)
treebda3e8810f16831767e69102db409152695ea523 /actionpack/test/controller
parent5b822aca4b6524c9147224764ec0f20a728ba2a1 (diff)
downloadrails-917423d664038d6791738a73ad1446437dbb71df.tar.gz
rails-917423d664038d6791738a73ad1446437dbb71df.tar.bz2
rails-917423d664038d6791738a73ad1446437dbb71df.zip
Provide a helper proxy to access helper methods from outside views. Closes #10839 [Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/helper_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb
index d18388821b..6dc77a4aaf 100644
--- a/actionpack/test/controller/helper_test.rb
+++ b/actionpack/test/controller/helper_test.rb
@@ -130,6 +130,22 @@ class HelperTest < Test::Unit::TestCase
assert methods.include?('foobar')
end
+ def test_helper_proxy
+ methods = ApplicationController.helpers.methods.map(&:to_s)
+
+ # ActionView
+ assert methods.include?('pluralize')
+
+ # abc_helper.rb
+ assert methods.include?('bare_a')
+
+ # fun/games_helper.rb
+ assert methods.include?('stratego')
+
+ # fun/pdf_helper.rb
+ assert methods.include?('foobar')
+ end
+
private
def expected_helper_methods
TestHelper.instance_methods.map(&:to_s)