Created
October 23, 2015 16:01
-
-
Save pikesley/735f67e939f6cd530888 to your computer and use it in GitHub Desktop.
Extract the body from a VCR cassette
This file contains 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
require 'yaml' | |
require 'json' | |
cassette = 'spec/vcr/Module_Class/some_cassette.yml' | |
body = (JSON.parse ((YAML.load File.read cassette)['http_interactions'][0]['response']['body']['string'])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment