Sha256: 50c245da0857d84346c6706b35a5691b51ad021b111fe72eb469eadb55297838

Contents?: true

Size: 1.48 KB

Versions: 74

Compression:

Stored size: 1.48 KB

Contents

require 'spec_helper'

set :os, { :family => nil }

describe get_command(:check_file_is_directory, '/tmp') do
  it { should eq 'test -d /tmp' }
end

describe get_command(:check_file_is_symlink, '/tmp') do
  it { should eq 'test -L /tmp' }
end

describe get_command(:change_file_mode, '/tmp', '0644') do
  it { should eq 'chmod 0644 /tmp' }
end

describe get_command(:change_file_owner, '/tmp', 'root') do
  it { should eq 'chown root /tmp' }
end

describe get_command(:change_file_owner, '/tmp', 'root', 'root') do
  it { should eq 'chown root:root /tmp' }
end

describe get_command(:change_file_group, '/tmp', 'root') do
  it { should eq 'chgrp root /tmp' }
end

describe get_command(:create_file_as_directory, '/tmp') do
  it { should eq 'mkdir -p /tmp' }
end

describe get_command(:get_file_owner_user, '/tmp') do
  it { should eq 'stat -c %U /tmp' }
end

describe get_command(:get_file_owner_group, '/tmp') do
  it { should eq 'stat -c %G /tmp' }
end

describe get_command(:move_file, '/src', '/dest') do
  it { should eq 'mv /src /dest' }
end

describe get_command(:link_file_to, '/link', '/target') do
  it { should eq 'ln -s /target /link' }
end

describe get_command(:remove_file, '/tmp') do
  it { should eq 'rm -rf /tmp' }
end

describe get_command(:check_file_is_link, '/tmp') do
  it { should eq 'test -L /tmp' }
end

describe get_command(:check_file_is_pipe, '/tmp') do
  it { should eq 'test -p /tmp' }
end

describe get_command(:get_file_link_target, '/tmp') do
  it { should eq 'readlink -f /tmp' }
end

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
specinfra-2.16.0 spec/command/base/file_spec.rb
specinfra-2.15.2 spec/command/base/file_spec.rb
specinfra-2.15.1 spec/command/base/file_spec.rb
specinfra-2.15.0 spec/command/base/file_spec.rb
specinfra-2.14.4 spec/command/base/file_spec.rb
specinfra-2.14.3 spec/command/base/file_spec.rb
specinfra-2.14.2 spec/command/base/file_spec.rb
specinfra-2.14.1 spec/command/base/file_spec.rb
specinfra-2.14.0 spec/command/base/file_spec.rb
specinfra-2.13.1 spec/command/base/file_spec.rb
specinfra-2.13.0 spec/command/base/file_spec.rb
specinfra-2.12.7 spec/command/base/file_spec.rb
specinfra-2.12.6 spec/command/base/file_spec.rb
specinfra-2.12.5 spec/command/base/file_spec.rb
specinfra-2.12.4 spec/command/base/file_spec.rb
specinfra-2.12.3 spec/command/base/file_spec.rb
specinfra-2.12.1 spec/command/base/file_spec.rb
specinfra-2.12.0 spec/command/base/file_spec.rb
specinfra-2.11.10 spec/command/base/file_spec.rb
specinfra-2.11.9 spec/command/base/file_spec.rb