mirror of
https://github.com/inspec/inspec
synced 2024-11-24 05:33:17 +00:00
31 lines
648 B
Ruby
31 lines
648 B
Ruby
|
|
||
|
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').exists? do
|
||
|
it { should eq true }
|
||
|
end
|
||
|
|
||
|
describe command('sh').exists? do
|
||
|
it { should eq true }
|
||
|
end
|
||
|
|
||
|
describe command('this is not existing').exists? do
|
||
|
it { should eq false }
|
||
|
end
|