aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--board.rb8
-rw-r--r--spec/board_spec.rb9
2 files changed, 17 insertions, 0 deletions
diff --git a/board.rb b/board.rb
index 19fa63b..9481d45 100644
--- a/board.rb
+++ b/board.rb
@@ -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