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:
parent
cdf2f28fc8
commit
6cb6290f5d
1 changed files with 3 additions and 1 deletions
|
@ -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!
|
||||
|
|
Loading…
Reference in a new issue