diff options
author | Timm <kaspth@gmail.com> | 2014-05-27 22:22:06 +0200 |
---|---|---|
committer | Timm <kaspth@gmail.com> | 2014-06-16 21:04:25 +0200 |
commit | 6cb6290f5ddd3001da56e767581c3b277367574a (patch) | |
tree | a568de74ccf01b999282c6cd5fc9546893032c55 /actionview/lib | |
parent | cdf2f28fc8a90906361957ee2310dfd09e07b7cd (diff) | |
download | rails-6cb6290f5ddd3001da56e767581c3b277367574a.tar.gz rails-6cb6290f5ddd3001da56e767581c3b277367574a.tar.bz2 rails-6cb6290f5ddd3001da56e767581c3b277367574a.zip |
Make output_buffers used in tests be utf-8 encoded. Fixing unknown encoding ASCII-8BIT test errors.
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/test_case.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb index 337fa0e840..2d54b90570 100644 --- a/actionview/lib/action_view/test_case.rb +++ b/actionview/lib/action_view/test_case.rb @@ -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! |