Sha256: a36d2838558d3abe5a59288627e54929ffa04ce8000d259b7b89e65f2441f604

Contents?: true

Size: 580 Bytes

Versions: 24

Compression:

Stored size: 580 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

  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

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

24 entries across 24 versions & 1 rubygems

Version Path
rhodes-2.0.3 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.2 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0.rc2 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0.rc1 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0.beta11 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0.beta10 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0.beta9 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0.beta8 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0.beta7 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0.beta6 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0.beta4 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0.beta3 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-1.5.5 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0.beta2 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-2.0.0.beta1 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-1.5.4 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-1.5.3 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-1.5.2 spec/framework_spec/app/spec/shared/file/readable.rb
rhodes-1.5.1 spec/framework_spec/app/spec/shared/file/readable.rb