Sha256: 9ed6538d36fe7a07fc920d2f159d6fadb735edc2bf967179ce3ebc94736da42c

Contents?: true

Size: 727 Bytes

Versions: 19

Compression:

Stored size: 727 Bytes

Contents

# encoding: utf-8
# author: Dominik Richter
# author: Christoph Hartmann

describe command('echo hello') do
  its('stdout') { should eq "hello\n" }
  its('stderr') { should eq '' }
  its('exit_status') { should eq 0 }
end

describe command('>&2 echo error') do
  its('stdout') { should eq '' }
  its('stderr') { should eq "error\n" }
  its('exit_status') { should eq 0 }
end

describe command('exit 123') do
  its('stdout') { should eq '' }
  its('stderr') { should eq '' }
  its('exit_status') { should eq 123 }
end

describe command('/bin/sh').exist? do
  it { should eq true }
end

describe command('sh').exist? do
  it { should eq true }
end

describe command('this is not existing').exist? do
  it { should eq false }
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
inspec-0.30.0 test/resource/command_test.rb
inspec-0.29.0 test/resource/command_test.rb
inspec-0.28.1 test/resource/command_test.rb
inspec-0.28.0 test/resource/command_test.rb
inspec-0.27.1 test/resource/command_test.rb
inspec-0.27.0 test/resource/command_test.rb
inspec-0.26.0 test/resource/command_test.rb
inspec-0.25.0 test/resource/command_test.rb
inspec-0.24.0 test/resource/command_test.rb
inspec-0.23 test/resource/command_test.rb
inspec-0.22.1 test/resource/command_test.rb
inspec-0.22.0 test/resource/command_test.rb
inspec-0.21.6 test/resource/command_test.rb
inspec-0.21.5 test/resource/command_test.rb
inspec-0.21.4 test/resource/command_test.rb
inspec-0.21.3 test/resource/command_test.rb
inspec-0.21.2 test/resource/command_test.rb
inspec-0.21.1 test/resource/command_test.rb
inspec-0.21.0 test/resource/command_test.rb