On Mar 23, 12:56 pm, Pedro Nascimento <
pnascime...@gmail.com> wrote:
> Rephrasing in a better way: If I have a huge text file that I want to be
> the body of my response. Instead of pasting it into the yaml, can I do it
> in another way?
>
> I have the feeling this might be more of a YAML question than a VCR
> question. :>
>
> On Fri, Mar 23, 2012 at 16:44, Myron Marston <
myron.mars...@gmail.com>wrote:
The phrasing of your question suggests you are managing/modifying the
VCR YAML files by hand. You can do this, of course, but VCR is
designed to be completely automatic in this regard. There are valid
reasons to manually change the YAML file but you shouldn't do it as a
matter of course.
If you want VCR to automatically store the response body in a separate
file, something like this should work:
https://gist.github.com/2174463
Caveats:
* I haven't tested that, so you may need to tweak it a bit to work.
* That assumes that each cassette will have only one HTTP
interaction. If you have multiple HTTP interactions in the same
cassette you will need to account for that some how and name the
response body files accordingly.