diff options
| -rw-r--r-- | board.rb | 8 | ||||
| -rw-r--r-- | spec/board_spec.rb | 9 |
2 files changed, 17 insertions, 0 deletions
@@ -1,4 +1,12 @@ class Board + def initialize + @board = [ + ['.', '.', '.'], + ['.', '.', '.'], + ['.', '.', '.'] + ] + end + def render puts "...\n" * 3 end diff --git a/spec/board_spec.rb b/spec/board_spec.rb index d71a47b..1370c10 100644 --- a/spec/board_spec.rb +++ b/spec/board_spec.rb @@ -17,4 +17,13 @@ describe Board do ... EOF end + + it 'starts with a grid of dots' do + @board.instance_variable_get('@board').must_equal [ + ['.', '.', '.'], + ['.', '.', '.'], + ['.', '.', '.'] + ] + end + end end |
