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:
parent
33df3ed384
commit
1f9a2ab7c9
1 changed files with 1 additions and 1 deletions
|
@ -29,6 +29,6 @@ module ApiHelpers
|
|||
end
|
||||
|
||||
def json_response
|
||||
JSON.parse(response.body)
|
||||
@_json_response ||= JSON.parse(response.body)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue