From 7d87ae00ff688530e0768707a1337dfea0d2819a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 14 Nov 2013 12:48:33 -0800 Subject: [PATCH] Use Atom::replicate for second project --- spec/pane-spec.coffee | 4 ++-- spec/project-spec.coffee | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/pane-spec.coffee b/spec/pane-spec.coffee index 0b5e4fe3b..b892995c7 100644 --- a/spec/pane-spec.coffee +++ b/spec/pane-spec.coffee @@ -699,11 +699,11 @@ describe "Pane", -> it "focuses the pane after attach only if had focus when serialized", -> reloadContainer = -> - projectState = project.serialize() + projectReplica = atom.replicate().get('project') containerState = container.serialize() container.remove() project.destroy() - window.project = deserialize(projectState) + window.project = projectReplica container = deserialize(containerState) pane = container.getRoot() container.attachToDom() diff --git a/spec/project-spec.coffee b/spec/project-spec.coffee index 5df379830..e205662ed 100644 --- a/spec/project-spec.coffee +++ b/spec/project-spec.coffee @@ -19,7 +19,8 @@ describe "Project", -> it "destroys unretained buffers and does not include them in the serialized state", -> project.bufferForPathSync('a') expect(project.getBuffers().length).toBe 1 - deserializedProject = deserialize(project.serialize()) + atom.getWindowState().serializeForPersistence() + deserializedProject = atom.replicate().get('project') expect(deserializedProject.getBuffers().length).toBe 0 expect(project.getBuffers().length).toBe 0