Sha256: 5dfc195e8490e711a0e0c89bc0eb0c3c569b4ad00d7ff840ccb71cbf9f281042

Contents?: true

Size: 754 Bytes

Versions: 5

Compression:

Stored size: 754 Bytes

Contents

require 'spec_helper'

set :os, {:family => 'linux'}

property[:os_by_host] = nil

describe commands.command_class('file').create do
  it { should be_an_instance_of(Specinfra::Command::Linux::Base::File) }
end

describe file('/tmp') do
  it { should be_readable.by_user('mail') }
end

describe file('/tmp') do
  it { should_not be_readable.by_user('invalid-user') }
end

describe file('/tmp') do
  it { should be_writable.by_user('mail') }
end

describe file('/tmp') do
  it { should_not be_writable.by_user('invalid-user') }
end


describe file('/tmp') do
  it { should be_executable.by_user('mail') }
end

describe file('/tmp') do
  it { should_not be_executable.by_user('invalid-user') }
end

describe file('/tmp') do
  it { should be_immutable }
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
serverspec-2.0.0.beta13 spec/type/linux/file_spec.rb
serverspec-2.0.0.beta12 spec/type/linux/file_spec.rb
serverspec-2.0.0.beta11 spec/type/linux/file_spec.rb
serverspec-2.0.0.beta10 spec/type/linux/file_spec.rb
serverspec-2.0.0.beta9 spec/type/linux/file_spec.rb