blob: d839b30e321b0a83dcf47b5b7f72f87636e0d32c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
require_relative '../../spec_helper'
describe "Float#finite?" do
it "returns true for finite values" do
3.14159.should.finite?
end
it "returns false for positive infinity" do
infinity_value.should_not.finite?
end
it "returns false for negative infinity" do
(-infinity_value).should_not.finite?
end
it "returns false for NaN" do
nan_value.should_not.finite?
end
end
|