Sha256: fceded1e3cb64138e024b2a8f1eec71dc4ca165fc0ce65832c51c4c708fd2855

Contents?: true

Size: 515 Bytes

Versions: 1

Compression:

Stored size: 515 Bytes

Contents

require_relative '../spec_helper'

describe LemonadeStand::Player do

  let(:player) { LemonadeStand::Player.new }

  it "should default the assets to 200 pennies" do
    player.assets.must_equal 200
  end

  describe "making a choice" do

    let(:game)   { Object.new }
    let(:choice) { Object.new }

    before do
      player.game = game
    end

    it "should pass the choice up to the game" do
      game.expects(:make_choice).with choice, { player: player }
      player.choose choice
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lemonade_stand-0.0.1 spec/lemonade_stand/player_spec.rb