       fs.removeSync(filePath) if fs.existsSync(filePath)
 
     it "updates all the rendered lines when the grammar changes", ->
-      editorView.edit(project.openSync(filePath))
+      editorView.edit(atom.project.openSync(filePath))
       expect(editorView.getGrammar().name).toBe 'Plain Text'
       atom.syntax.setGrammarOverrideForPath(filePath, 'source.js')
       editorView.reloadGrammar()

    it "emits event when editor view view receives a new buffer", ->
      eventHandler = jasmine.createSpy('eventHandler')
      editorView.on 'editor:path-changed', eventHandler
      editorView.edit(project.openSync(filePath))
      expect(eventHandler).toHaveBeenCalled()

    it "stops listening to events on previously set buffers", ->


    describe "when autoscrolling at the end of the document", ->
      it "renders lines properly", ->
        editorView.edit(atom.project.openSync('two-hundred.txt'))
        editorView.attachToDom(heightInLines: 5.5)

        expect(editorView.renderedLines.find('.line').length).toBe 8
