aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/float/ceil_spec.rb
blob: 8037164c68466d62b76f067e3295c7516c349755 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require File.expand_path('../../../spec_helper', __FILE__)

describe "Float#ceil" do
  it "returns the smallest Integer greater than or equal to self" do
    -1.2.ceil.should eql( -1)
    -1.0.ceil.should eql( -1)
    0.0.ceil.should  eql( 0 )
    1.3.ceil.should  eql( 2 )
    3.0.ceil.should  eql( 3 )
    -9223372036854775808.1.ceil.should eql(-9223372036854775808)
    +9223372036854775808.1.ceil.should eql(+9223372036854775808)
  end
end