Created
January 26, 2016 17:34
-
-
Save msroot/c2b639432a146bb7099c to your computer and use it in GitHub Desktop.
Use VCR cassette to match attributes in rspec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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