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

Version Path
rubyjobbuilderdsl-0.0.2 vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/numeric/pos_spec.rb
rubyjobbuilderdsl-0.0.1 vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/numeric/pos_spec.rb
powerpack-0.1.0 spec/powerpack/numeric/pos_spec.rb
powerpack-0.0.9 spec/powerpack/numeric/pos_spec.rb
powerpack-0.0.8 spec/powerpack/numeric/pos_spec.rb
powerpack-0.0.7 spec/powerpack/numeric/pos_spec.rb
powerpack-0.0.6 spec/powerpack/numeric/pos_spec.rb
powerpack-0.0.5 spec/powerpack/numeric/pos_spec.rb
powerpack-0.0.4 spec/powerpack/numeric/pos_spec.rb