           expect(matches.length).toBe 1
 
       it "excludes values in core.ignoredNames", ->
-        atom.projectPath = path.join(__dirname, 'fixtures', 'git', 'working-dir')
+        projectPath = path.join(__dirname, 'fixtures', 'git', 'working-dir')
         ignoredNames = atom.config.get("core.ignoredNames")
         ignoredNames.push("a")
         atom.config.set("core.ignoredNames", ignoredNames)


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

      editor2 = editor1.copy()
      expect(handler.callCount).toBe 2
      expect(project.getEditSessions().length).toBe 2
      expect(project.getEditSessions()[0]).toBe editor1
      expect(project.getEditSessions()[1]).toBe editor2

  describe ".openSync(path)", ->
    [fooOpener, barOpener, absolutePath, newBufferHandler, newEditSessionHandler] = []

        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

