Sha256: 9d3b4e1ed6c52c1d411f0130ad7904d52a36f4b73f8e924de7a2de2ea4992ce6

Contents?: true

Size: 453 Bytes

Versions: 14

Compression:

Stored size: 453 Bytes

Contents

module CassetteHelper
  def self.extended(base)
    base.around do |spec|
      VCR.insert_cassette(_cassette, _cassette_options) if defined?(_cassette) && _cassette
      spec.run
      VCR.eject_cassette if defined?(_cassette) && _cassette
    end
  end

  def cassette(*args)
    options = args.extract_options!

    let(:_cassette) do |example|
      args.first || example.full_description
    end

    let(:_cassette_options) { options }
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
hubspot-api-ruby-0.19.0 spec/support/cassette_helper.rb
hubspot-api-ruby-0.18.0 spec/support/cassette_helper.rb
hubspot-api-ruby-0.17.1 spec/support/cassette_helper.rb
hubspot-api-ruby-0.17.0 spec/support/cassette_helper.rb
hubspot-api-ruby-0.16.0 spec/support/cassette_helper.rb
hubspot-api-ruby-0.15.0 spec/support/cassette_helper.rb
hubspot-api-ruby-0.14.0 spec/support/cassette_helper.rb
hubspot-api-ruby-0.13.0 spec/support/cassette_helper.rb
hubspot-api-ruby-0.12.0 spec/support/cassette_helper.rb
hubspot-api-ruby-0.11.0 spec/support/cassette_helper.rb
hubspot-api-ruby-0.10.0 spec/support/cassette_helper.rb
hubspot-api-ruby-0.9.0 spec/support/cassette_helper.rb
hubspot-api-ruby-0.8.1 spec/support/cassette_helper.rb
hubspot-api-ruby-0.8.0 spec/support/cassette_helper.rb