Sha256: 65617f4315befcdf8ad75605d523b33c1603ff51225664985d0f3a7de5c66ba2
Contents?: true
Size: 573 Bytes
Versions: 3
Compression:
Stored size: 573 Bytes
Contents
require 'spec_helper' module Berkshelf describe FileUtils do describe '#ln_r' do it "should skip broken symlinks during traversal" do Dir.mktmpdir do |dir| path = Pathname.new(File.join(dir, 'ln_r_test')) Dir.mkdir(path) Dir.chdir(path) do File.open('original', 'w') {} File.symlink('original', 'link_to_original') FileUtils.rm('original') end -> { FileUtils.ln_r(path, File.join(dir, 'link_to_dir')) }.should_not raise_error end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems