Commit 1f9a2ab7 authored by Robert Speicher's avatar Robert Speicher

Memoize result of JSON.parse in json_response

This might see a minor speedup in test cases that call this method many
times.
parent 33df3ed3
......@@ -29,6 +29,6 @@ module ApiHelpers
end
def json_response
JSON.parse(response.body)
@_json_response ||= JSON.parse(response.body)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment