From 7265b897805aee6b858fb72f5fc33e4622635dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 13 Sep 2018 18:23:20 -0400 Subject: Make sure the flash method is defined even if helpers are not present --- actionpack/test/controller/flash_test.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/flash_test.rb b/actionpack/test/controller/flash_test.rb index a4330897cf..409a4ec2e6 100644 --- a/actionpack/test/controller/flash_test.rb +++ b/actionpack/test/controller/flash_test.rb @@ -343,11 +343,18 @@ class FlashIntegrationTest < ActionDispatch::IntegrationTest end def test_flash_usable_in_metal_without_helper + controller_class = nil + assert_nothing_raised do - Class.new ActionController::Metal do + controller_class = Class.new(ActionController::Metal) do include ActionController::Flash end end + + controller = controller_class.new + + assert_respond_to controller, :alert + assert_respond_to controller, :notice end private -- cgit v1.2.3