Sha256: 74d8380b88c175ea2baf55af2825736b2f7df6634b0ed3c028b883f1dad85b3e
Contents?: true
Size: 715 Bytes
Versions: 83
Compression:
Stored size: 715 Bytes
Contents
describe :struct_equal_value, :shared => true do it "returns true if the other is the same object" do car = same_car = Struct::Car.new("Honda", "Accord", "1998") car.send(@method, same_car).should == true end it "returns true if the other has all the same fields" do car = Struct::Car.new("Honda", "Accord", "1998") similar_car = Struct::Car.new("Honda", "Accord", "1998") car.send(@method, similar_car).should == true end it "returns false if the other is a different object or has different fields" do car = Struct::Car.new("Honda", "Accord", "1998") different_car = Struct::Car.new("Honda", "Accord", "1995") car.send(@method, different_car).should == false end end
Version data entries
83 entries across 83 versions & 1 rubygems