I am writing an API wrapper as a gem and I want to test API responses using RSpec.
The problem is that all API requests are executed using GET and contain the API key in the URL:
eg. game/metadata/{api_key}
This poses problems for testing since I don't want to store the API key in the git repository history. Is there a way I can fulfill these specifications, preferably with RSpec / VCR, and not store the API key in version control?
I tried using environment variables, but the VCR saves the entire request, not just the response body.
Andrew Stewart
source share