Re: [rspec-users] Testing the <=> operator

2010-03-15 Thread David Chelimsky
On Mar 15, 2010, at 11:16 PM, Chris DiMartino wrote: > I'm having trouble getting rspec to allow me to test my Comparable class. I > would like to test the <=> method, but rspec is giving me unexpected results: > > @hand = Hand.new('R') > @other_hand = Hand.new('S') > @hand.should be > @other_h

[rspec-users] Testing the <=> operator

2010-03-15 Thread Chris DiMartino
I'm having trouble getting rspec to allow me to test my Comparable class. I would like to test the <=> method, but rspec is giving me unexpected results: @hand = Hand.new('R') @other_hand = Hand.new('S') @hand.should be > @other_hand expected > #, got # Shouldn't that test be checking for the c