From 4fb518c28ce2b66ddb5483c07a2f185394ed80c4 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Tue, 25 Jul 2017 22:27:11 -0400 Subject: Fix testing helpers that use Action View's capturing helpers (e.g. content_for) --- actionview/lib/action_view/test_case.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionview/lib') diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb index 8542978e34..efe8c87b9b 100644 --- a/actionview/lib/action_view/test_case.rb +++ b/actionview/lib/action_view/test_case.rb @@ -103,6 +103,7 @@ module ActionView def setup_with_controller @controller = ActionView::TestCase::TestController.new @request = @controller.request + @view_flow = ActionView::OutputFlow.new # empty string ensures buffer has UTF-8 encoding as # new without arguments returns ASCII-8BIT encoded buffer like String#new @output_buffer = ActiveSupport::SafeBuffer.new "" @@ -246,6 +247,7 @@ module ActionView :@test_passed, :@view, :@view_context_class, + :@view_flow, :@_subscribers, :@html_document ] -- cgit v1.2.3