Sha256: 0713777e14d5d8b870f62c844426e4b3115852cc9143f9757c614116c8540351
Contents?: true
Size: 485 Bytes
Versions: 9
Compression:
Stored size: 485 Bytes
Contents
require 'spec_helper' describe 'Numeric#pos?' do it 'returns true for positive integer' do expect(1.pos?).to be_true end it 'returns true for positive float' do expect(0.1.pos?).to be_true end it 'returns false for negative integer' do expect(-1.pos?).to be_false end it 'returns false for negative float' do expect(-0.01.pos?).to be_false end it 'returns false for 0' do expect(0.pos?).to be_false expect(0.0.pos?).to be_false end end
Version data entries
9 entries across 9 versions & 2 rubygems