Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SyntaxError:
- .../x_and_o_spec.rb:14: syntax error, unexpected =>, expecting '}'
- expect(board).to eq {0 =>"-", 1 =>"-", 2 =>"-", 3 =>"
- ^
- .../x_and_o_spec.rb:14: syntax error, unexpected ',', expecting keyword_end
- expect(board).to eq {0 =>"-", 1 =>"-", 2 =>"-", 3 =>"-",
- ^
- .../x_and_o_spec.rb:14: syntax error, unexpected ',', expecting end-of-input
- oard).to eq {0 =>"-", 1 =>"-", 2 =>"-", 3 =>"-", 4 =>"-",
- {0=>"-", 1=>"-", 2=>"-", 3=>"-", 4=>"-", 5=>"-", 6=>"-", 7=>"-", 8=>"-", 9=>"-"}
- class Grid
- attr_accessor :board
- def initialize
- @board = {}
- (0..9).each do |key|
- @board[key] = "-"
- end
- end
- end
- it 'Grid has 9 elements, each element is a value of nil, o or X' do
- board = Grid.new.board
- expect(board).to eq {0 =>"-", 1 =>"-", 2 =>"-", 3 =>"-", 4 =>"-", 5 =>"-", 6 =>"-", 7 =>"-", 8 =>"-", 9 =>"-"}
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement