force utf-8 encoding for prior to fixture parsing to prevent nokogiri issues

This commit is contained in:
Mike Greiling 2017-01-03 15:26:14 -06:00
parent ca404170f0
commit 8cee3b1d36

View file

@ -26,6 +26,7 @@ module JavaScriptFixturesHelpers
def store_frontend_fixture(response, fixture_file_name)
fixture_file_name = File.expand_path(fixture_file_name, FIXTURE_PATH)
fixture = response.body
fixture.force_encoding("utf-8")
response_mime_type = Mime::Type.lookup(response.content_type)
if response_mime_type.html?