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