Sha256: 2678ef8fbf24ff678f8ec74f1348d181496cf4aefdfd7b14b120ebb50b6137ae
Contents?: true
Size: 728 Bytes
Versions: 15
Compression:
Stored size: 728 Bytes
Contents
require 'spec_helper' describe Jax::Util::Tar do include Jax::Util::Tar it "should use relative paths, not absolute ones" do src = File.expand_path("../../../../tmp/jax-tar", File.dirname(__FILE__)) dest = File.expand_path("../../../../tmp/jax-tar/dst", File.dirname(__FILE__)) FileUtils.rm_rf src if File.exist?(src) FileUtils.rm_rf dest if File.exist?(dest) Dir.mkdir src unless File.directory?(src) Dir.chdir src do File.open "root-file", "w" do |f| f.print "CONTENT" end end tarfile = tar src untar tarfile, dest File.should exist(File.join(dest, "root-file")) File.read(File.join(dest, "root-file")).should == "CONTENT" end end
Version data entries
15 entries across 15 versions & 1 rubygems