Memoize result of JSON.parse in json_response

This might see a minor speedup in test cases that call this method many
times.
This commit is contained in:
Robert Speicher 2015-05-31 23:03:19 -04:00
parent 33df3ed384
commit 1f9a2ab7c9

View file

@ -29,6 +29,6 @@ module ApiHelpers
end
def json_response
JSON.parse(response.body)
@_json_response ||= JSON.parse(response.body)
end
end