Sha256: f93815d943ecc8bb390e6abfe1c768ad74ac5c16662f800c96f0cf745b2cdf48

Contents?: true

Size: 485 Bytes

Versions: 9

Compression:

Stored size: 485 Bytes

Contents

require 'spec_helper'

describe 'Numeric#neg?' do
  it 'returns false for positive integer' do
    expect(1.neg?).to be_false
  end

  it 'returns false for positive float' do
    expect(0.1.neg?).to be_false
  end

  it 'returns true for negative integer' do
    expect(-1.neg?).to be_true
  end

  it 'returns true for negative float' do
    expect(-0.01.neg?).to be_true
  end

  it 'returns false for 0' do
    expect(0.neg?).to be_false
    expect(0.0.neg?).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/neg_spec.rb
rubyjobbuilderdsl-0.0.1 vendor/bundle/ruby/2.1.0/gems/powerpack-0.0.9/spec/powerpack/numeric/neg_spec.rb
powerpack-0.1.0 spec/powerpack/numeric/neg_spec.rb
powerpack-0.0.9 spec/powerpack/numeric/neg_spec.rb
powerpack-0.0.8 spec/powerpack/numeric/neg_spec.rb
powerpack-0.0.7 spec/powerpack/numeric/neg_spec.rb
powerpack-0.0.6 spec/powerpack/numeric/neg_spec.rb
powerpack-0.0.5 spec/powerpack/numeric/neg_spec.rb
powerpack-0.0.4 spec/powerpack/numeric/neg_spec.rb