Hand = require('hoyle').Hand
describe "Finding winning hands", ->
it "should detect the winning hand from a list", ->
gary = Hand.make(["2s","3s","4h","5c","As","Ts","8d"])
mike = Hand.make(["5s","Ts","3h","Ac","2s","Ts","8d"])
steve = Hand.make(["5s","5h","3s","3c","2s","Ts","3d"])
winners = Hand.pickWinners([gary, mike, steve])
winners.length.should.equal 1
winners[0].should.equal steve
winners[0].name.should.equal "Full house"
git clone git://github.com/mdp/hoyle.git
cd hoyle
npm install
npm run-script prepublish
npm link