     describe "when passed a path that matches a custom opener", ->
       it "returns the resource returned by the custom opener", ->
         pathToOpen = atom.project.resolve('a.foo')
-        expect(project.openSync(pathToOpen, hey: "there")).toEqual { foo: pathToOpen, options: {hey: "there"} }
-        expect(project.openSync("bar://baz")).toEqual { bar: "bar://baz" }
+        expect(atom.project.openSync(pathToOpen, hey: "there")).toEqual { foo: pathToOpen, options: {hey: "there"} }
+        expect(atom.project.openSync("bar://baz")).toEqual { bar: "bar://baz" }
 
   describe ".open(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(project.openSync(absolutePath).buffer).toBe editor.buffer
          expect(project.openSync('a').buffer).toBe editor.buffer
          expect(newBufferHandler).not.toHaveBeenCalled()
          expect(newEditSessionHandler).toHaveBeenCalledWith editor



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

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

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