Sha256: db9297aeee58d817ece986e152238078185e337762985b7e3220e69b3b07997b
Contents?: true
Size: 637 Bytes
Versions: 28
Compression:
Stored size: 637 Bytes
Contents
describe :file_readable, :shared => true do before :each do @file = '/tmp/i_exist' end after :each do File.delete(@file) if File.exists?(@file) end unless System.get_property('platform') == 'WINDOWS' it "returns true if named file is readable by the effective user id of the process, otherwise false" do @object.send(@method, '/etc/passwd').should == true File.open(@file,'w') { @object.send(@method, @file).should == true } end end end describe :file_readable_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
28 entries across 28 versions & 1 rubygems