Best practice for extracting data from a response #958
Unanswered
jamesarosen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here's what I want:
I could use a Dynamic ERB Cassette and inject the expected value into it. The downside there is that it's something I need to maintain every time the cassette gets re-recorded.
I could use an after_http_request hook, but that has to be configured globally. That means (a) the response parsing looks magical from the perspective of the spec and (b) I need to store the extracted value somewhere global as well.
Does anyone have a good pattern for this?
Beta Was this translation helpful? Give feedback.
All reactions