mirror of
https://github.com/inspec/inspec
synced 2025-02-16 22:18:38 +00:00
add test
This commit is contained in:
parent
efec6310c8
commit
53dbaa9c3e
2 changed files with 6 additions and 1 deletions
|
@ -232,7 +232,7 @@ end
|
|||
RSpec::Matchers.define :cmp do |first_expected|
|
||||
|
||||
def integer?(value)
|
||||
!(value =~ /\A[1-9]\d*\Z/).nil?
|
||||
!(value =~ /\A[0-9]\d*\Z/).nil?
|
||||
end
|
||||
|
||||
def float?(value)
|
||||
|
|
|
@ -112,4 +112,9 @@ if os.linux?
|
|||
it { should cmp 'False' }
|
||||
it { should cmp false }
|
||||
end
|
||||
|
||||
describe 0 do
|
||||
it { should cmp 0 }
|
||||
it { should cmp '0' }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue