Tuesday, 26 January 2016

Use VCR cassette to match attributes in rspec Raw

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
view raw gistfile1.txt hosted with ❤ by GitHub

No comments:

Post a Comment