Sha256: ef04cf49b4ee2f12e2f4f10f1e931c78209ff608f43a953fcc50b57427151f7f
Contents?: true
Size: 591 Bytes
Versions: 52
Compression:
Stored size: 591 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) describe "Bignum#<=" do before(:each) do @bignum = bignum_value(39) end it "returns true if self is less than or equal to other" do (@bignum <= @bignum).should == true (-@bignum <= -(@bignum - 1)).should == true (@bignum <= (@bignum + 0.5)).should == true (@bignum <= 4.999).should == false end it "raises an ArgumentError when given a non-Integer" do lambda { @bignum <= "4" }.should raise_error(ArgumentError) lambda { @bignum <= mock('str') }.should raise_error(ArgumentError) end end
Version data entries
52 entries across 52 versions & 2 rubygems