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.23.0 spec/command/base/file_spec.rb
specinfra-2.22.0 spec/command/base/file_spec.rb
specinfra-2.21.1 spec/command/base/file_spec.rb
specinfra-2.21.0 spec/command/base/file_spec.rb
specinfra-2.20.2 spec/command/base/file_spec.rb
specinfra-2.20.1 spec/command/base/file_spec.rb
specinfra-2.20.0 spec/command/base/file_spec.rb
specinfra-2.19.6 spec/command/base/file_spec.rb
specinfra-2.19.5 spec/command/base/file_spec.rb
specinfra-2.19.4 spec/command/base/file_spec.rb
specinfra-2.19.3 spec/command/base/file_spec.rb
specinfra-2.19.2 spec/command/base/file_spec.rb
specinfra-2.19.1 spec/command/base/file_spec.rb
specinfra-2.19.0 spec/command/base/file_spec.rb
specinfra-2.18.3 spec/command/base/file_spec.rb
specinfra-2.18.2 spec/command/base/file_spec.rb
specinfra-2.18.1 spec/command/base/file_spec.rb
specinfra-2.18.0 spec/command/base/file_spec.rb
specinfra-2.17.1 spec/command/base/file_spec.rb
specinfra-2.17.0 spec/command/base/file_spec.rb