Decode Compressed Response
When the :decode_compressed_response
option is set to a truthy value, VCR will decompress "gzip" and "deflate" response bodies before recording. This ensures that these interactions become readable and editable after being serialized.
This option should be avoided if the actual decompression of response bodies is part of the functionality of the library or app being tested.
Background ()
Given a file named "decompress.rb" with:
The option is not set by default
When I append to file "decompress.rb":
And I run ruby decompress.rb
Then the file "cassettes/decompress.yml" should contain a YAML fragment like:
The option is enabled
When I append to file "decompress.rb":
And I run ruby decompress.rb
Then the file "cassettes/decompress.yml" should contain a YAML fragment like:
And the file "cassettes/decompress.yml" should contain:
Last updated