Sha256: db44d7c5b9f788a4ce5dee377f9c5d7192b9a044be9431510c922b066fefe41e

Contents?: true

Size: 477 Bytes

Versions: 12

Compression:

Stored size: 477 Bytes

Contents

describe Integer, "#integer?" do
  [0, 23, 4509, 2222981011].each do |n|
    it "should return true for integer #{n}" do
      n.should be_integer
    end
  end
end

describe Float, "#integer?" do
  [23.0, 4509.0, 2222981011.000].each do |n|
    it "should return true for integer #{n}" do
      n.should be_integer
    end
  end

  [23.5, 4509.0000001, 2222981011.020].each do |n|
    it "should return false for float #{n}" do
      n.should_not be_integer
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
numb-0.114.0 spec/numb/integer_p_spec.rb
numb-0.111.0 spec/numb/integer_p_spec.rb
numb-0.109.0 spec/numb/integer_p_spec.rb
numb-0.99.0 spec/numb/integer_p_spec.rb
numb-0.96.0 spec/numb/integer_p_spec.rb
numb-0.89.0 spec/numb/integer_p_spec.rb
numb-0.84.0 spec/integer_p_spec.rb
numb-0.77.0 spec/integer_p_spec.rb
numb-0.72.1 spec/integer_p_spec.rb
numb-0.72.0 spec/integer_p_spec.rb
numb-0.68.0 spec/integer_p_spec.rb
numb-0.63.0 spec/integer_p_spec.rb