update float spec which related to Float#round

This commit is contained in:
Watson
2013-02-06 12:17:17 +09:00
parent e301b83f3d
commit 6527b680bf

View File

@@ -32,6 +32,12 @@ describe "Float" do
1356890400.step(1356908032.0, 7200.0).to_a.should == [1356890400.0, 1356897600.0, 1356904800.0]
end
it "round" do
# issue 506
flt = 0.678547.round(2)
flt.to_s.should == "0.68"
end
it "NSDecimalNumber.decimalNumberWithMantissa" do
# issue 427
number = NSDecimalNumber.decimalNumberWithMantissa(3000000000, exponent: 0,isNegative: false)
@@ -64,4 +70,4 @@ describe "Float" do
f.__fixfloat__?.should == true
end
end
end
end