mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
document OR feature
This commit is contained in:
parent
baaaf3c95b
commit
8bb791c12f
1 changed files with 20 additions and 1 deletions
19
README.md
19
README.md
|
@ -170,6 +170,25 @@ Also have a look at our examples for:
|
|||
- [Using InSpec with Test Kitchen & Ansible](https://github.com/chef/inspec/tree/master/examples/kitchen-ansible)
|
||||
- [Implementing an InSpec profile](https://github.com/chef/inspec/tree/master/examples/profile)
|
||||
|
||||
## Or tests: Testing for a OR b
|
||||
|
||||
* Using describe.one, you can test for a or b. The control will be marked as passing if EITHER condition is met.
|
||||
|
||||
```ruby
|
||||
control 'or-test' do
|
||||
impact 1.0
|
||||
title 'This is a OR test'
|
||||
describe.one do
|
||||
describe ssh_config do
|
||||
its('Protocol') { should eq('3') }
|
||||
end
|
||||
describe ssh_config do
|
||||
its('Protocol') { should eq('2') }
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
## Command Line Usage
|
||||
|
||||
### exec
|
||||
|
|
Loading…
Reference in a new issue