Sha256: 5f69f7bdc58f9f4160df783be29a398d9f227d785c45876b6ec96c4bd4e6821b

Contents?: true

Size: 581 Bytes

Versions: 52

Compression:

Stored size: 581 Bytes

Contents

describe :file_writable, :shared => true do
  before :each do
    @file = tmp('i_exist')
  end

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

  it "returns true if named file is writable by the effective user id of the process, otherwise false" do
    @object.send(@method, '/etc/passwd').should == false
    File.open(@file,'w') { @object.send(@method, @file).should == true }
  end
end

describe :file_writable_missing, :shared => true do
  it "returns false if the file does not exist" do
    @object.send(@method, 'fake_file').should == false
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
rhodes-2.3.2 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.3.2.beta.2 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.3.2.beta.1 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.3.1 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.3.1.beta.1 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.3.0 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.3.0.beta.3 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.3.0.beta.2 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.3.0.beta.1 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.2.6 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.2.6.beta.1 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.2.5 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.2.5.beta.3 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.2.5.beta.2 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.2.5.beta.1 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.2.4.beta.1 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.2.3 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.2.3.beta.1 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.2.2 spec/framework_spec/app/spec/shared/file/writable.rb
rhodes-2.2.2.beta.1 spec/framework_spec/app/spec/shared/file/writable.rb