Sha256: 5375c735b8a80422c2c1b0821179545f2bf04e24fffe83bdff5b863a5ebe8220
Contents?: true
Size: 753 Bytes
Versions: 19
Compression:
Stored size: 753 Bytes
Contents
require 'spec_helper' describe String do describe "is_integer?" do it 'returns true if string is an integer and not 0' do expect("1".is_integer?).to eq true end it 'returns true if string is an integer and not 0' do expect("01".is_integer?).to eq true end it 'returns true if string is an integer and not 0' do expect("331299".is_integer?).to eq true end it 'returns true if string is an integer and not 0' do expect("000331299".is_integer?).to eq true end it 'returns false if string is not an integer or is 0' do expect("0".is_integer?).to eq false end it 'returns false if string is not an integer or is 0' do expect("yolo".is_integer?).to eq false end end end
Version data entries
19 entries across 19 versions & 1 rubygems