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