title: Rspec failing test where 'Diff:', looks identical
body: <p><strong>Aim</strong></p>
  
  <p>My program uses an algorithm to make a board, line-by-line in an array of arrays.</p>
  
  <p>The final array looks like this (a standard 3x3 board with a border):</p>
  
  <p><code>[['-----'],['|...|'],['|...|'],['|...|'],['-----']]</code></p>
  
  <p><strong>Problem</strong></p>
  
  <p>The failing test is as follows:</p>
  
  <p>Note: <code>view_board</code> puts @board</p>
  
  <p><code>expect { board.view_board }.to output(['-----','|...|','|...|','|...|','-----']).to_stdout</code></p>
  
  <p>Outputting:</p>
  
  <pre><code> `Failure/Error: expect { board.view_board }.to output(['-----','|...|','|...|','|...|','-----']).to_stdout
     expected block to output ["-----", "|...|", "|...|", "|...|", "-----"] to stdout, but output "-----\n|...|\n|...|\n|...|\n-----\n"
     Diff:`
  </code></pre>
  
  <p><strong>What'd different?</strong></p>
  
  <p>I'm not sure if there's a space somewhere I've missed, if I change the final array to <code>"-----\n"</code>, then I get:</p>
  
  <p><code>Diff:
         @@ -2,5 +2,5 @@
          |...|
          |...|
          |...|
         ------\n
         +-----</code></p>
  
  <p>Edit:</p>
  
  <p><strong>Board-Generating Code</strong></p>
  
  <pre><code>class Board
  BOARD_ROW = '-'
  BOARD_COLUMM = '|'
  BEGINNING_AND_END_LENGTH = 2
  
  def initialize(board_size = 3)
      @board = []
      @board_top_and_bottom = []
      @board_middle = []
      @board_size = board_size
  end
  
  def go
      set_board
  end
  
  def set_board
      set_board_top_and_bottom
      set_board_middle
      assemble_board
      view_board
  end
  
  def set_board_top_and_bottom
      (@board_size + BEGINNING_AND_END_LENGTH).times do 
          @board_top_and_bottom.push(BOARD_ROW)    
      end
      @board_top_and_bottom = [@board_top_and_bottom.join]
  end
  
  def set_board_middle
      add_board_edge
      add_board_spaces
      add_board_edge
      @board_middle = [@board_middle.join]
  end
  
  def add_board_spaces
      @board_size.times do 
          @board_middle.push('.')    
      end
  end
  
  def add_board_edge
      @board_middle &lt;&lt; BOARD_COLUMM
  end
  
  def assemble_board
      @board &lt;&lt; @board_top_and_bottom
      @board_size.times do
          @board &lt;&lt; @board_middle
      end
      @board &lt;&lt; @board_top_and_bottom
  end
  
  def view_board
      puts @board
  end
  end
  </code></pre>