aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/helper_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb
index ad66f138eb..4f8ff4140f 100644
--- a/actionpack/test/controller/helper_test.rb
+++ b/actionpack/test/controller/helper_test.rb
@@ -25,6 +25,13 @@ class AllHelpersController < ActionController::Base
helper :all
end
+class JustMeController < ActionController::Base
+ clear_helpers
+end
+
+class MeTooController < JustMeController
+end
+
module LocalAbcHelper
def a() end
def b() end
@@ -92,6 +99,11 @@ class HelperTest < ActiveSupport::TestCase
# assert_equal 'test: baz', Fun::PdfController.process(request, response).body
end
+ def test_default_helpers_only
+ assert_equal [JustMeHelper], JustMeController._helpers.ancestors.reject(&:anonymous?)
+ assert_equal [MeTooHelper, JustMeHelper], MeTooController._helpers.ancestors.reject(&:anonymous?)
+ end
+
def test_all_helpers
methods = AllHelpersController._helpers.instance_methods.map {|m| m.to_s}