Sha256: a6d8f45442a936f664c0d29e0236ff308b7612d78649b33a4a8fbbe168503597
Contents?: true
Size: 748 Bytes
Versions: 83
Compression:
Stored size: 748 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' describe "Fixnum#==" do it "returns true if self has the same value as other" do (1 == 1).should == true (9 == 5).should == false # Actually, these call Float#==, Bignum#== etc. (9 == 9.0).should == true (9 == 9.01).should == false (10 == bignum_value).should == false end it "calls 'other == self' if the given argument is not a Fixnum" do (1 == '*').should == false obj = mock('one other') obj.should_receive(:==).any_number_of_times.and_return(false) 1.should_not == obj obj = mock('another') obj.should_receive(:==).any_number_of_times.and_return(true) 2.should == obj end end
Version data entries
83 entries across 83 versions & 1 rubygems