mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
Correct/Enhance cmp
matcher examples (#3537)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
This commit is contained in:
parent
6a39158aa7
commit
955d444b95
1 changed files with 3 additions and 1 deletions
|
@ -55,8 +55,10 @@ end
|
|||
|
||||
```ruby
|
||||
describe sshd_config do
|
||||
# Only `'2'` works
|
||||
its('Protocol') { should eq '2' }
|
||||
|
||||
# Both of these work
|
||||
its('Protocol') { should cmp '2' }
|
||||
its('Protocol') { should cmp 2 }
|
||||
end
|
||||
|
@ -74,7 +76,7 @@ end
|
|||
* Recognize versions embedded in strings
|
||||
|
||||
```ruby
|
||||
describe package(curl) do
|
||||
describe package('curl') do
|
||||
its('version') { should cmp > '7.35.0-1ubuntu2.10' }
|
||||
end
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue