Sha256: d9ded5b3456005ac6fcc6090a8a70aeb7af9dc4ed222ed94f720f5cc3a987fa0
Contents?: true
Size: 715 Bytes
Versions: 83
Compression:
Stored size: 715 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' describe "File.readlink" do before :each do @file1 = 'test.txt' @file3 = 'test.lnk' File.delete(@file3) if File.exists?(@file3) File.open(@file1, 'w+') { } # File.symlink(@file1, @file3) end after :each do File.delete(@file1) if File.exists?(@file1) File.delete(@file3) if File.symlink?(@file3) end it "return the name of the file referenced by the given link" do File.readlink(@file3).should == @file1 end it "raises an Errno::ENOENT if called with an invalid argument" do lambda { File.readlink("/this/surely/doesnt/exist") }.should raise_error(Errno::ENOENT) end end
Version data entries
83 entries across 83 versions & 1 rubygems