Sha256: 9596fc8c982a393aebb95466dfcecb424ce0754aa6aacbc41e763c59069f60bc

Contents?: true

Size: 536 Bytes

Versions: 1

Compression:

Stored size: 536 Bytes

Contents

require 'test_helper'
require 'scoring'

describe Yahtzee::Scoring do
  subject { Yahtzee::Scoring }

  describe "score(dice, placement)" do
    describe "UpperCard Scoring" do
      let(:score_card) { Yahtzee::ScoreCard.new }
      let(:save_card)  { Yahtzee::ScoreCard.persist(score_card) }
      it "must keep state" do
        card = subject.score([1,1,3,4,5], :aces, &save_card)
        card = subject.score([1,2,2,4,5], :twos, &save_card)
        card.aces.must_equal 2
        card.twos.must_equal 4
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
functional-yahtzee-0.0.3 test/integration/scoring_test.rb