<commit_before>require 'spec_helper'

describe TTT::Board::Cell do
  let(:cell) { TTT::Board::Cell.new(position: 1) }

  class TestPlayer
    def move
      'X'
    end
  end

  it 'should not be nil' do
    cell.should_not be_nil
  end

  it 'should have default content' do
    cell.content.should == '.'
  end

  it 'should take a players update' do
    cell.players_move(TestPlayer.new)
    cell.content.should == 'X'
  end
end<commit_msg>Add spec for players move.<commit_after>require 'spec_helper'

describe TTT::Board::Cell do
  let(:cell) { TTT::Board::Cell.new(position: 1) }

  class TestPlayer
    def move
      'X'
    end
  end

  it 'should not be nil' do
    cell.should_not be_nil
  end

  it 'should have default content' do
    cell.content.should == '.'
  end

  context 'when player makes a move' do

    let(:player) { TestPlayer.new }

    it 'should mirror that move' do
      cell.players_move(player)
      cell.content.should == player.move
    end
  end
end
{'fraction_non_alphanumeric': 0.10446247464503043, 'fraction_numerical': 0.002028397565922921, 'mean_word_length': 2.85546875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4464756', 'n_tokens_mistral': 345, 'n_tokens_neox': 330, 'n_words': 100}