Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
f553b6cde5ff
Commit
1f9a2ab7
authored
May 31, 2015
by
Robert Speicher
Browse files
Memoize result of JSON.parse in json_response
This might see a minor speedup in test cases that call this method many times.
parent
1e494205c50f
Changes
1
Hide whitespace changes
Inline
Side-by-side
spec/support/api_helpers.rb
View file @
f553b6cd
...
...
@@ -29,6 +29,6 @@ def api(path, user = nil)
end
def
json_response
JSON
.
parse
(
response
.
body
)
@_json_response
||=
JSON
.
parse
(
response
.
body
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment