jdan/rubycards — pull request #21 by darrencauthon (2014-07-25 04:09:46+00:00)
Title: Comparing cards

When I was trying to implement one of my other pull requests with TDD, I noticed that I wasn't getting the :red_circle: on a test that I **knew** had to be failing. The two cards were not the same, so why were they :green_apple: ??

I found that the reason was the <=> comparison override. It was changed to be suit-agnostic, which is fine when measuring the value of cards, but... this is death when verifying cards are what they are.

I poked around and ended up writing a "same_as?" method for comparing cards.