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.30.4 spec/command/base/file_spec.rb
specinfra-2.30.3 spec/command/base/file_spec.rb
specinfra-2.30.2 spec/command/base/file_spec.rb
specinfra-2.30.1 spec/command/base/file_spec.rb
specinfra-2.30.0 spec/command/base/file_spec.rb
specinfra-2.29.0 spec/command/base/file_spec.rb
specinfra-2.28.4 spec/command/base/file_spec.rb
specinfra-2.28.3 spec/command/base/file_spec.rb
specinfra-2.28.2 spec/command/base/file_spec.rb
specinfra-2.28.1 spec/command/base/file_spec.rb
specinfra-2.28.0 spec/command/base/file_spec.rb
specinfra-2.27.1 spec/command/base/file_spec.rb
specinfra-2.27.0 spec/command/base/file_spec.rb
specinfra-2.26.1 spec/command/base/file_spec.rb
specinfra-2.26.0 spec/command/base/file_spec.rb
specinfra-2.25.1 spec/command/base/file_spec.rb
specinfra-2.25.0 spec/command/base/file_spec.rb
specinfra-2.24.2 spec/command/base/file_spec.rb
specinfra-2.24.1 spec/command/base/file_spec.rb
specinfra-2.24.0 spec/command/base/file_spec.rb