Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes the content types that should be considered "text" configurable #38

Merged
merged 1 commit into from
Dec 26, 2017
Merged

Makes the content types that should be considered "text" configurable #38

merged 1 commit into from
Dec 26, 2017

Conversation

ktraunmueller
Copy link

@ktraunmueller ktraunmueller commented Dec 14, 2017

With the current VCRURLConnection master, responses from jsonApi endpoints will be saved base64-encoded to the cassette json. This is a pain when writing tests against the content returned in such responses.

With this pull request, the list of content types that are considered text (and therefore won't get base64-encoded when saved to file) has been made configurable.

In our tests (Swift), we're setting it to

VCR.textContentTypes = ["application/json",  "application/vnd.api+json"]

which will result in human-readable JSON in the cassettes.

@dstnbrkr
Copy link
Owner

This is great - thank you!

@dstnbrkr dstnbrkr merged commit 38bb24f into dstnbrkr:master Dec 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants