Skip to content

Instantly share code, notes, and snippets.

@msroot
Created January 26, 2016 17:34
Use VCR cassette to match attributes in rspec
vcr_resp = YAML.load_file(ROOT + '/spec/cassettes/' + VCR.current_cassette.name + ".yml").with_indifferent_access
resp = JSON.parse(vcr_resp[:http_interactions].first).with_indifferent_access
vcr_resp[:http_interactions] its an array
find the request based on the method and url and
use json to parse it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment