Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. SyntaxError:
  2. .../x_and_o_spec.rb:14: syntax error, unexpected =>, expecting '}'
  3. expect(board).to eq {0 =>"-", 1 =>"-", 2 =>"-", 3 =>"
  4. ^
  5. .../x_and_o_spec.rb:14: syntax error, unexpected ',', expecting keyword_end
  6. expect(board).to eq {0 =>"-", 1 =>"-", 2 =>"-", 3 =>"-",
  7. ^
  8. .../x_and_o_spec.rb:14: syntax error, unexpected ',', expecting end-of-input
  9. oard).to eq {0 =>"-", 1 =>"-", 2 =>"-", 3 =>"-", 4 =>"-",
  10.  
  11. {0=>"-", 1=>"-", 2=>"-", 3=>"-", 4=>"-", 5=>"-", 6=>"-", 7=>"-", 8=>"-", 9=>"-"}
  12.  
  13. class Grid
  14. attr_accessor :board
  15. def initialize
  16. @board = {}
  17. (0..9).each do |key|
  18. @board[key] = "-"
  19. end
  20. end
  21. end
  22.  
  23. it 'Grid has 9 elements, each element is a value of nil, o or X' do
  24. board = Grid.new.board
  25. expect(board).to eq {0 =>"-", 1 =>"-", 2 =>"-", 3 =>"-", 4 =>"-", 5 =>"-", 6 =>"-", 7 =>"-", 8 =>"-", 9 =>"-"}
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement