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

Version Path
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/rdtool-0.6.38/test/temp-dir.rb
tdiary-5.0.8 vendor/bundle/gems/rdtool-0.6.38/test/temp-dir.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/rdtool-0.6.38/test/temp-dir.rb
tdiary-5.0.5 vendor/bundle/gems/rdtool-0.6.38/test/temp-dir.rb
tdiary-5.0.4 vendor/bundle/gems/rdtool-0.6.38/test/temp-dir.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/rdtool-0.6.38/test/temp-dir.rb
tdiary-3.2.2.20130518 vendor/rdtool-0.6.38/test/temp-dir.rb
tdiary-3.2.2.20130508 vendor/rdtool-0.6.38/test/temp-dir.rb
tdiary-3.2.2.20130507 vendor/rdtool-0.6.38/test/temp-dir.rb
rdtool-0.6.38 test/temp-dir.rb
rdtool-0.6.37 test/temp-dir.rb
rdtool-0.6.36 test/temp-dir.rb
rdtool-0.6.35 test/temp-dir.rb
rdtool-0.6.34 test/temp-dir.rb
rdtool-0.6.33 test/temp-dir.rb
rdtool-0.6.32 test/temp-dir.rb
rdtool-0.6.31 test/temp-dir.rb
rdtool-0.6.30 test/temp-dir.rb
rdtool-0.6.29 test/temp-dir.rb
rdtool-0.6.28 test/temp-dir.rb