Sha256: a7986ea6064decfc161d7e3449595831775be59ef02d8ae45d41dd19387a8fb0
Contents?: true
Size: 826 Bytes
Versions: 83
Compression:
Stored size: 826 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/fixtures/classes' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/shared/eql' describe "Array#==" do it_behaves_like :array_eql, :== it "returns false if any corresponding elements are not #==" do a = ["a", "b", "c"] b = ["a", "b", "not equal value"] a.should_not == b c = mock("c") c.should_receive(:==).and_return(false) ["a", "b", c].should_not == a end it "returns true if corresponding elements are #==" do [].should == [] ["a", "c", 7].should == ["a", "c", 7] [1, 2, 3].should == [1.0, 2.0, 3.0] obj = mock('5') obj.should_receive(:==).and_return(true) [obj].should == [5] end end
Version data entries
83 entries across 83 versions & 1 rubygems