Sha256: c8d0095847d668c699d596d15b6606051ce4efb4bd6797918173c6ecc1d44bd3

Contents?: true

Size: 1.02 KB

Versions: 83

Compression:

Stored size: 1.02 KB

Contents

describe :file_symlink, :shared => true do
  before :each do
    @file = "test.txt"
    @link = "test.lnk"
    File.delete(@link) if File.exist?(@link)
    File.delete(@file) if File.exist?(@file)
    File.open(@file,"w+")
  end

  after :each do
    File.delete(@link) if File.exist?(@link)
    File.delete(@file) if File.exist?(@file)
  end

  platform_is_not :windows do
    it "returns true if the file is a link" do
      File.symlink(@file, @link)
      @object.send(@method, @link).should == true
    end
  end
end

describe :file_symlink_nonexistent, :shared => true do
  before :each do
    @file = "test.txt"
    @link = "test.lnk"
    File.delete(@link) if File.exist?(@link)
    File.delete(@file) if File.exist?(@file)
    File.open(@file,"w+")
  end

  after :each do
    File.delete(@link) if File.exist?(@link)
    File.delete(@file) if File.exist?(@file)
  end

  platform_is_not :windows do
    it "returns false if the file does not exist" do
      @object.send(@method, "non_existent_link").should == false
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
rhodes-3.1.1 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.1.1.beta spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.1.0 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.1.0.beta.5 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.1.0.beta.4 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.1.0.beta.3 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.1.0.beta.2 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.1.0.beta.1 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.0.2 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.0.2.beta.1 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.0.1 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.0.1.beta.8 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.0.1.beta.7 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.0.1.beta.6 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.0.1.beta.5 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.0.1.beta.4 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.0.1.beta.3 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.0.1.beta.2 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.0.0 spec/framework_spec/app/spec/shared/file/symlink.rb
rhodes-3.0.0.beta.7 spec/framework_spec/app/spec/shared/file/symlink.rb