Sha256: 189b78bbeab613bbe058aafc5c4ea165b52113a072ae5020be7927953b83fdc5

Contents?: true

Size: 1023 Bytes

Versions: 11

Compression:

Stored size: 1023 Bytes

Contents

require 'spec_helper'

set :os, { :family => nil }

describe 'File related commands'  do
  after do
    property[:os_by_host] = nil
  end

  context Specinfra.command.check_file_is_directory('/tmp') do
    it { should eq 'test -d /tmp' }
  end

  context Specinfra.command.change_file_mode('/tmp', '0644') do
    it { should eq 'chmod 0644 /tmp' }
  end

  context Specinfra.command.change_file_owner('/tmp', 'root') do
    it { should eq 'chown root /tmp' }
  end

  context Specinfra.command.change_file_owner('/tmp', 'root', 'root') do
    it { should eq 'chown root:root /tmp' }
  end

  context Specinfra.command.change_file_group('/tmp', 'root') do
    it { should eq 'chgrp root /tmp' }
  end

  context Specinfra.command.create_file_as_directory('/tmp') do
    it { should eq 'mkdir -p /tmp' }
  end

  context Specinfra.command.get_file_owner_user('/tmp') do
    it { should eq 'stat -c %U /tmp' }
  end

  context Specinfra.command.get_file_owner_group('/tmp') do
    it { should eq 'stat -c %G /tmp' }
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
specinfra-2.0.0.beta31 spec/command/base/file_spec.rb
specinfra-2.0.0.beta30 spec/command/base/file_spec.rb
specinfra-2.0.0.beta29 spec/command/base/file_spec.rb
specinfra-2.0.0.beta28 spec/command/base/file_spec.rb
specinfra-2.0.0.beta27 spec/command/base/file_spec.rb
specinfra-2.0.0.beta26 spec/command/base/file_spec.rb
specinfra-2.0.0.beta25 spec/command/base/file_spec.rb
specinfra-2.0.0.beta24 spec/command/base/file_spec.rb
specinfra-2.0.0.beta23 spec/command/base/file_spec.rb
specinfra-2.0.0.beta22 spec/command/base/file_spec.rb
specinfra-2.0.0.beta21 spec/command/base/file_spec.rb