require './lib/player'

describe Player do
  let(:player1) { Player.new('Arthur', 'X') }

  describe '#initialize' do
    it 'checks if the player has a name' do
      expect(player1.player[:name]).to eql('Arthur')
    end
    it "checks if the player has a mark ('X' or 'O')" do
      expect(player1.player[:mark]).to eql('X')
    end
  end

  describe '#add_moves' do
    it 'add moves to the list of moves that the player has made' do
      player1.add_moves(4)
      player1.add_moves(3)
      expect(player1.player_moves).to eql([4, 3])
    end
  end
end
