Sha256: 90ea3422393c0e1a1efcdbea9c0b8bda49449b8f4f53f62821d2081385745737
Contents?: true
Size: 254 Bytes
Versions: 24
Compression:
Stored size: 254 Bytes
Contents
def in_temp_dir tmpdir = "test-tmp.#$$" pwd = Dir.pwd Dir.mkdir(tmpdir) Dir.chdir(tmpdir) begin yield ensure Dir.chdir(pwd) Dir.rmdir(tmpdir) end end def remove_file(file) if File.exist? file File.unlink(file) end end
Version data entries
24 entries across 23 versions & 2 rubygems