This commit is contained in:
Jeremy J. Miller 2016-08-29 15:57:46 -04:00
parent efec6310c8
commit 53dbaa9c3e
2 changed files with 6 additions and 1 deletions

View file

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

View file

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