diff options
Diffstat (limited to 'actionpack/test/abstract')
-rw-r--r-- | actionpack/test/abstract/helper_test.rb | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/actionpack/test/abstract/helper_test.rb b/actionpack/test/abstract/helper_test.rb index 73941222dc..b28a5b5afb 100644 --- a/actionpack/test/abstract/helper_test.rb +++ b/actionpack/test/abstract/helper_test.rb @@ -38,6 +38,10 @@ module AbstractController end end + class ::HelperyTestController < AbstractHelpers + clear_helpers + end + class AbstractHelpersBlock < ControllerWithHelpers helper do include ::AbstractController::Testing::HelperyTest @@ -45,7 +49,6 @@ module AbstractController end class TestHelpers < ActiveSupport::TestCase - def setup @controller = AbstractHelpers.new end @@ -74,8 +77,22 @@ module AbstractController @controller.process(:with_module) assert_equal "Module Included", @controller.response_body end - end + class ClearHelpersTest < ActiveSupport::TestCase + def setup + @controller = HelperyTestController.new + end + + def test_clears_up_previous_helpers + @controller.process(:with_symbol) + assert_equal "I respond to bare_a: false", @controller.response_body + end + + def test_includes_controller_default_helper + @controller.process(:with_block) + assert_equal "Hello Default", @controller.response_body + end + end end end |