         fileChangeHandler.callCount > 0
 
       runs ->
-        expect(editorView.getText()).toBe(originalPathText)
+        expect(editor.getText()).toBe(originalPathText)
 
   describe ".pixelPositionForBufferPosition(position)", ->
     describe "when the editor view is detached", ->


    describe "when the cursor is on the second to last line and the last line is empty", ->
      it "does not move the line", ->
        editorView.moveCursorToBottom()
        editorView.insertNewline()
        editorView.setCursorBufferPosition([12, 2])
        editorView.trigger 'editor:move-line-down'
        expect(buffer.lineForRow(12)).toBe '};'
        expect(buffer.lineForRow(13)).toBe ''
        expect(editorView.getSelectedBufferRange()).toEqual [[12, 2], [12, 2]]

    describe "where there is a selection", ->
      describe "when the selection falls inside the line", ->
        it "maintains the selection", ->
          editorView.setSelectedBufferRange([[1, 2], [1, 5]])
          expect(editorView.getSelectedText()).toBe 'var'
          editorView.trigger 'editor:move-line-down'
          expect(editorView.getSelectedBufferRange()).toEqual [[2, 2], [2, 5]]
          expect(editorView.getSelectedText()).toBe 'var'

      describe "where there are multiple lines selected", ->
        it "moves the selected lines down", ->
          editorView.setSelectedBufferRange([[2, 0], [3, Infinity]])
          editorView.trigger 'editor:move-line-down'
          expect(buffer.lineForRow(2)).toBe '    while(items.length > 0) {'
          expect(buffer.lineForRow(3)).toBe '    if (items.length <= 1) return items;'

          expect(editorView.firstRenderedScreenRow).toBe 9
          expect(editorView.lastRenderedScreenRow).toBe 15

          editor.backspace()

          expect(editorView.scrollTop()).toBeLessThan initialScrollTop
          expect(editorView.firstRenderedScreenRow).toBe 9
