 
         beforeEach ->
           sourceProjectPath = path.join(__dirname, 'fixtures', 'git', 'working-dir')
-          atom.projectPath = path.join(temp.mkdirSync("atom"))
+          projectPath = path.join(temp.mkdirSync("atom"))
 
           writerStream = fstream.Writer(projectPath)
           fstream.Reader(sourceProjectPath).pipe(writerStream)


      editor1 = atom.project.openSync("a")
      expect(handler.callCount).toBe 1
      expect(project.getEditSessions().length).toBe 1
      expect(project.getEditSessions()[0]).toBe editor1

      editor2 = atom.deserializers.deserialize(editor1.serialize())
      expect(handler.callCount).toBe 2
      expect(project.getEditSessions().length).toBe 2
      expect(project.getEditSessions()[0]).toBe editor1
      expect(project.getEditSessions()[1]).toBe editor2

  describe "when an edit session is copied", ->
    it "emits an 'editor-created' event and stores the edit session", ->

        it "returns a new edit session containing previously opened buffer and emits a 'editor-created' event", ->
          editor = atom.project.openSync(absolutePath)
          newBufferHandler.reset()
          expect(atom.project.openSync(absolutePath).buffer).toBe editor.buffer
          expect(atom.project.openSync('a').buffer).toBe editor.buffer
          expect(newBufferHandler).not.toHaveBeenCalled()
          expect(newEditSessionHandler).toHaveBeenCalledWith editor

