           editor.insertText(' t8')
           editor.addCursorAtBufferPosition([0, 2])
           simulateTabKeyEvent()
-          expect(buffer.lineForRow(0)).toBe "t9  var quicksort = function () {"
-          expect(buffer.lineForRow(12)).toBe "}; t8 "
+          expect(editor.lineTextForBufferRow(0)).toBe "t9  var quicksort = function () {"
+          expect(editor.lineTextForBufferRow(12)).toBe "}; t8 "
 
       describe "when a snippet is triggered within an existing snippet expansion", ->
         it "ignores the snippet expansion and goes to the next tab stop", ->

          simulateTabKeyEvent()
          simulateTabKeyEvent()
          simulateTabKeyEvent()
          expect(buffer.lineForRow(2)).toBe "go here next:(abc) and finally go here:(  )"
          expect(editor.getMarkerCount()).toBe markerCountBefore

        describe "when tab stops are nested", ->
          it "destroys the inner tab stop if the outer tab stop is modified", ->
            buffer.setText('')
            editor.insertText 't5'
            atom.commands.dispatch editorElement, 'snippets:expand'
            expect(buffer.lineForRow(0)).toBe '"key": value'
            expect(editor.getSelectedBufferRange()).toEqual [[0, 0], [0, 5]]
            editor.insertText("foo")
            simulateTabKeyEvent()

        editor.setText('')
        editor.insertText('bad1')
        atom.commands.dispatch editorElement, 'snippets:expand'
        expect(editor.getText()).toBe 'bad1'

        editor.setText('')
        editor.setText('bad2')
        atom.commands.dispatch editorElement, 'snippets:expand'
        expect(editor.getText()).toBe 'bad2'

    describe "when the letters preceding the cursor trigger a snippet", ->
      describe "when the snippet contains no tab stops", ->
