aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-06-09 14:50:01 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-06-09 16:47:39 -0700
commitacb244778587ff400f5b1d54e27028a2dae91101 (patch)
tree1f5ef2834fed591730bf6c3ce76333151fd4479a /actionpack/test
parentd7e0cb05cc8adad430d0e97efef1608eef58db80 (diff)
downloadrails-acb244778587ff400f5b1d54e27028a2dae91101.tar.gz
rails-acb244778587ff400f5b1d54e27028a2dae91101.tar.bz2
rails-acb244778587ff400f5b1d54e27028a2dae91101.zip
Write documentation for AbstractController::Helpers
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/helper_test.rb19
1 files changed, 16 insertions, 3 deletions
diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb
index 342cbfbcd3..515c4c9f52 100644
--- a/actionpack/test/controller/helper_test.rb
+++ b/actionpack/test/controller/helper_test.rb
@@ -127,7 +127,11 @@ class HelperTest < Test::Unit::TestCase
end
def test_all_helpers
- methods = AllHelpersController.master_helper_module.instance_methods.map {|m| m.to_s}
+ methods = if defined?(ActionController::Http)
+ AllHelpersController._helpers.instance_methods.map {|m| m.to_s}
+ else
+ AllHelpersController.master_helper_module.instance_methods.map {|m| m.to_s}
+ end
# abc_helper.rb
assert methods.include?('bare_a')
@@ -143,7 +147,12 @@ class HelperTest < Test::Unit::TestCase
@controller_class.helpers_dir = File.dirname(__FILE__) + '/../fixtures/alternate_helpers'
# Reload helpers
- @controller_class.master_helper_module = Module.new
+ if defined?(ActionController::Http)
+ @controller_class._helpers = Module.new
+ else
+ @controller_class.master_helper_module = Module.new
+ end
+
@controller_class.helper :all
# helpers/abc_helper.rb should not be included
@@ -175,7 +184,11 @@ class HelperTest < Test::Unit::TestCase
end
def master_helper_methods
- @controller_class.master_helper_module.instance_methods.map {|m| m.to_s }
+ if defined?(ActionController::Http)
+ @controller_class._helpers.instance_methods.map {|m| m.to_s }
+ else
+ @controller_class.master_helper_module.instance_methods.map {|m| m.to_s }
+ end
end
def missing_methods