Correct/Enhance cmp matcher examples (#3537)

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
This commit is contained in:
Jerry Aldrich 2018-10-23 13:02:40 -07:00 committed by Jared Quick
parent 6a39158aa7
commit 955d444b95

View file

@ -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
```