 
     describe "when folds are created and destroyed", ->
       describe "when a fold spans multiple lines", ->
-        fit "replaces the lines spanned by the fold with a single line with a html class of 'fold'", ->
+        it "replaces the lines spanned by the fold with a placeholder that references the fold object", ->
           fold = renderer.createFold(4, 7)
 
-          foldPlaceholder = renderer.lineForRow(4)
-          expect(foldPlaceholder.fold).toBe fold
-          expect(foldPlaceholder.text).toMatch /^4-+/
-          expect(foldPlaceholder.bufferDelta).toEqual [4, 0]
-          expect(foldPlaceholder.screenDelta).toEqual [1, 0]
-          expect(renderer.lineForRow(5).text).toBe '8'
+          [line4, line5] = renderer.linesForRows(4, 5)
+          expect(line4.fold).toBe fold
+          expect(line4.text).toMatch /^4-+/
+          expect(line4.bufferDelta).toEqual [4, 0]
+          expect(line4.screenDelta).toEqual [1, 0]
+          expect(line5.text).toBe '8'
 
           expect(changeHandler).toHaveBeenCalled()
           [event] = changeHandler.argsForCall[0]

          changeHandler.reset()

      describe "when a fold is nested within another fold", ->
        it "only renders the placeholder for the inner fold when the outer fold is destroyed", ->
          outerFold = renderer.createFold([[4, 29], [8, 36]])
          innerFold = renderer.createFold([[8, 5], [8, 10]])

          [line4, line5] = renderer.linesForRows(4, 5)
          expect(line4.text).toBe '    while(items.length > 0) {...concat(sort(right));'
          expect(line5.text).toBe '  };'

          outerFold.destroy()

          [line4, line5] = renderer.linesForRows(4, 5)
          expect(line4.text).toBe '    while(items.length > 0) {'
          expect(line5.text).toBe '      current = items.shift();'
          expect(renderer.lineForRow(8).text).toBe '    r... sort(left).concat(pivot).concat(sort(right));'

        it "allows the outer fold to start at the same location as the inner fold", ->
          renderer.createFold([[4, 29], [7, 4]])


          fold.destroy()

          [line4, line5] = renderer.linesForRows(4, 5)
          expect(line4.fold).toBeUndefined()
          expect(line4.text).toMatch /^4-+/
          expect(line4.bufferDelta).toEqual [1, 0]
          expect(line4.screenDelta).toEqual [1, 0]
          expect(line5.text).toBe '5'

          expect(changeHandler).toHaveBeenCalled()
          [[event]] = changeHandler.argsForCall
