Sha256: 6f2c435e0f67c49df151ecaf8ecfb5155d4dc3bf7202155e3e5e562dd70b9bbf
Contents?: true
Size: 708 Bytes
Versions: 83
Compression:
Stored size: 708 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/fixtures/classes' describe "Numeric#eql?" do before(:each) do @obj = NumericSub.new end it "returns false if self's and other's types don't match" do @obj.should_not eql(1) @obj.should_not eql(-1.5) @obj.should_not eql(bignum_value) @obj.should_not eql(:sym) end it "returns the result of calling self#== with other when self's and other's types match" do other = NumericSub.new @obj.should_receive(:==).with(other).and_return("result", nil) @obj.should eql(other) @obj.should_not eql(other) end end
Version data entries
83 entries across 83 versions & 1 rubygems