Skip to content

Instantly share code, notes, and snippets.

@pablete
Created May 8, 2013 21:38
Show Gist options
  • Select an option

  • Save pablete/5543873 to your computer and use it in GitHub Desktop.

Select an option

Save pablete/5543873 to your computer and use it in GitHub Desktop.
describe 'Board', ->
describe '#mark', ->
it 'contains empty cells', ->
@board = new Board()
expect(@board.cells).toEqual(['', '', '', '', '', '', '', '', ''])
it 'contains a marked cell', ->
@board = new Board()
@board.mark(1, @board.HUMAN)
expect(@board.cells).toEqual(['', 'X', '', '', '', '', '', '', ''])
it 'remains unaffected if marked cell is not within boundaries', ->
@board = new Board()
@board.mark(99, @board.HUMAN)
expect(@board.cells).toEqual(['', '', '', '', '', '', '', '', ''])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment