diff options
| author | Teddy Wing | 2015-04-11 16:36:46 -0400 | 
|---|---|---|
| committer | Teddy Wing | 2015-04-11 16:36:46 -0400 | 
| commit | 4f027d92648bdd2cc11a06490283540740b8676e (patch) | |
| tree | 3f30b340da631db3d35bce9bc395e5d218ec6063 | |
| parent | fcc227c2c7e8f409dc286c9f00a4395b7cc8133c (diff) | |
| download | tic-tac-toe-4f027d92648bdd2cc11a06490283540740b8676e.tar.bz2 | |
Board#render: return output instead of printing
Don't print the grid directly. We'll do this in a separate display
method or game loop area.
| -rw-r--r-- | board.rb | 2 | ||||
| -rw-r--r-- | spec/board_spec.rb | 6 | 
2 files changed, 2 insertions, 6 deletions
| @@ -8,6 +8,6 @@ class Board    end    def render -    puts "...\n" * 3 +    "...\n" * 3    end  end diff --git a/spec/board_spec.rb b/spec/board_spec.rb index 1370c10..86b4276 100644 --- a/spec/board_spec.rb +++ b/spec/board_spec.rb @@ -7,11 +7,7 @@ describe Board do    describe '#render' do      it 'prints a grid' do -      out, err = capture_io do -        @board.render -      end -       -      out.must_equal <<EOF +      @board.render.must_equal <<EOF  ...  ...  ... | 
