Sha256: 9e6cadc14e445cd0927d8855b53af3fc50819c9a5278a3d74cb131e312c7cb76

Contents?: true

Size: 399 Bytes

Versions: 15

Compression:

Stored size: 399 Bytes

Contents

module TempCassetteLibraryDir
  def temp_dir(dir, options = {})
    before(:each) do
      @temp_dir = dir
      @dir_remover = lambda { FileUtils.rm_rf(@temp_dir) if File.exist?(@temp_dir) }
      @dir_remover.call
      if options[:assign_to_cassette_library_dir]
        VCR::Config.cassette_library_dir = @temp_dir
      end
    end

    after(:each) do
      @dir_remover.call
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vcr-1.6.0 spec/support/temp_cassette_library_dir.rb
vcr-1.5.1 spec/support/temp_cassette_library_dir.rb
vcr-1.5.0 spec/support/temp_cassette_library_dir.rb
vcr-1.4.0 spec/support/temp_cassette_library_dir.rb
vcr-1.3.3 spec/support/temp_cassette_library_dir.rb
vcr-1.3.2 spec/support/temp_cassette_library_dir.rb
vcr-1.3.1 spec/support/temp_cassette_library_dir.rb
vcr-1.3.0 spec/support/temp_cassette_library_dir.rb
vcr-1.2.0 spec/support/temp_cassette_library_dir.rb
vcr-1.1.2 spec/support/temp_cassette_library_dir.rb
vcr-1.1.1 spec/support/temp_cassette_library_dir.rb
vcr-0.4.1 spec/support/temp_cassette_library_dir.rb
vcr-0.4.0 spec/support/temp_cassette_library_dir.rb
vcr-0.3.1 spec/support/temp_cassette_library_dir.rb
vcr-0.3.0 spec/support/temp_cassette_library_dir.rb