[rspec-users] Testing the <=> operator
chris.dimartino at gmail.com
Tue Mar 16 00:16:19 EDT 2010
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
@hand = Hand.new('R')
@other_hand = Hand.new('S')
@hand.should be > @other_hand
expected > #<RPS::Hand:0x7f2d93661490>, got #<RPS::Hand:0x7f2d936615d0
Shouldn't that test be checking for the comparison operator?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users