On Mon, Mar 9, 2009 at 2:32 PM, Rich Morin <r...@cfcl.com> wrote: > At 10:54 -0700 3/9/09, Pat Maddox wrote: >> Use should == instead of equal. == is equality, equal >> is object identity. You very rarely want to use equal. > > It's probably far too late to change this, but it might > have made more sense to define same_obj_as?() for the > object identity case, leaving equal?() available for the > more common test.
You're about two years too late. If I had it to do over again, I'd probably stick with the original version: "this".should equal(this) :this.should be(:this) But changing that back now would result in mutiny. C'est la vie. > > -r > -- > http://www.cfcl.com/rdm Rich Morin > http://www.cfcl.com/rdm/resume r...@cfcl.com > http://www.cfcl.com/rdm/weblog +1 650-873-7841 > > Technical editing and writing, programming, and web development > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users