Sha256: 79900c119ae16138dd08e9d22c8f88ba4e4b5b7b86fe6adb28bae390cf5e9c7d

Contents?: true

Size: 1.02 KB

Versions: 14

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'

require 'serverspec/helper/base'
include Serverspec::Helper::Base
include Serverspec::Helper::Exec

describe 'configurations are not set' do
  context file('/etc/passwd') do
    it { should be_file }
    its(:command) { should eq 'test -f /etc/passwd' }
  end
end

describe 'path is set' do
  let(:path) { '/sbin:/usr/sbin' }
  context file('/etc/passwd') do
    it { should be_file }
    its(:command) { should eq 'env PATH=/sbin:/usr/sbin:$PATH test -f /etc/passwd' }
  end
end

describe 'pre_command is set' do
  let(:pre_command) { 'source ~/.zshrc' }
  context file('/etc/passwd') do
    it { should be_file }
    its(:command) { should eq 'source ~/.zshrc && test -f /etc/passwd' }
  end
end

describe 'path and pre_command are set' do
  let(:path) { '/sbin:/usr/sbin' }
  let(:pre_command) { 'source ~/.zshrc' }
  context file('/etc/passwd') do
    it { should be_file }
    its(:command) { should eq 'env PATH=/sbin:/usr/sbin:$PATH source ~/.zshrc && env PATH=/sbin:/usr/sbin:$PATH test -f /etc/passwd' }
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
serverspec-0.6.30 spec/backend/exec/configuration_spec.rb
serverspec-0.6.29 spec/backend/exec/configuration_spec.rb
serverspec-0.6.28 spec/backend/exec/configuration_spec.rb
serverspec-0.6.27 spec/backend/exec/configuration_spec.rb
serverspec-0.6.26 spec/backend/exec/configuration_spec.rb
serverspec-0.6.25 spec/backend/exec/configuration_spec.rb
serverspec-0.6.24 spec/backend/exec/configuration_spec.rb
serverspec-0.6.23 spec/backend/exec/configuration_spec.rb
serverspec-0.6.22 spec/backend/exec/configuration_spec.rb
serverspec-0.6.21 spec/backend/exec/configuration_spec.rb
serverspec-0.6.20 spec/backend/exec/configuration_spec.rb
serverspec-0.6.19 spec/backend/exec/configuration_spec.rb
serverspec-0.6.18 spec/backend/exec/configuration_spec.rb
serverspec-0.6.17 spec/backend/exec/configuration_spec.rb