Sha256: 9abcaab3690dc3cb70532b5f99abe18545dbc8bd3c746c9733616730940e34ee

Contents?: true

Size: 309 Bytes

Versions: 7

Compression:

Stored size: 309 Bytes

Contents

# frozen_string_literal: true

module VCRHelper
  def load_vcr_hash(fixture, key)
    yaml = YAML.load_file(VCR.configuration.cassette_library_dir + "/#{fixture}.yml")
    response = VCR::HTTPInteraction.from_hash(yaml["http_interactions"][0]).response.decompress.body
    JSON.parse(response)[key]
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gecko-ruby-0.12.3 test/support/vcr_support.rb
gecko-ruby-0.12.2 test/support/vcr_support.rb
gecko-ruby-0.12.1 test/support/vcr_support.rb
gecko-ruby-0.12.0 test/support/vcr_support.rb
gecko-ruby-0.11.1 test/support/vcr_support.rb
gecko-ruby-0.11.0 test/support/vcr_support.rb
gecko-ruby-0.10.0 test/support/vcr_support.rb