1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Make output_buffers used in tests be utf-8 encoded. Fixing unknown encoding ASCII-8BIT test errors.

This commit is contained in:
Timm 2014-05-27 22:22:06 +02:00
parent cdf2f28fc8
commit 6cb6290f5d

View file

@ -103,7 +103,9 @@ module ActionView
def setup_with_controller
@controller = ActionView::TestCase::TestController.new
@request = @controller.request
@output_buffer = ActiveSupport::SafeBuffer.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 ''
@rendered = ''
make_test_case_available_to_view!