Sha256: ebcf256d56d98ff32d87ddc8c9899a55da23a20462bf3e1ac89016e211eeebf9
Contents?: true
Size: 493 Bytes
Versions: 18
Compression:
Stored size: 493 Bytes
Contents
require 'spec_helper' describe 'Numeric#pos?' do it 'returns true for positive integer' do expect(1.pos?).to be_truthy end it 'returns true for positive float' do expect(0.1.pos?).to be_truthy end it 'returns false for negative integer' do expect(-1.pos?).to be_falsey end it 'returns false for negative float' do expect(-0.01.pos?).to be_falsey end it 'returns false for 0' do expect(0.pos?).to be_falsey expect(0.0.pos?).to be_falsey end end
Version data entries
18 entries across 15 versions & 5 rubygems