From fbd0c3677c60bcdbf485baee03ec4176e075d0aa Mon Sep 17 00:00:00 2001 From: Daniel Hengeveld Date: Tue, 20 Oct 2015 16:40:11 +0200 Subject: [PATCH] Fix up deserialize specs --- spec/git-repository-async-spec.coffee | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/spec/git-repository-async-spec.coffee b/spec/git-repository-async-spec.coffee index 3bab16bf7..581872053 100644 --- a/spec/git-repository-async-spec.coffee +++ b/spec/git-repository-async-spec.coffee @@ -405,7 +405,7 @@ describe "GitRepositoryAsync", -> atom.project.getRepositories()[0].destroy() expect(-> editor.save()).not.toThrow() - xdescribe "when a project is deserialized", -> + describe "when a project is deserialized", -> [buffer, project2] = [] afterEach -> @@ -429,7 +429,10 @@ describe "GitRepositoryAsync", -> buffer.append('changes') statusHandler = jasmine.createSpy('statusHandler') - project2.getRepositories()[0].onDidChangeStatus statusHandler + project2.getRepositories()[0].async.onDidChangeStatus statusHandler buffer.save() - expect(statusHandler.callCount).toBe 1 - expect(statusHandler).toHaveBeenCalledWith {path: buffer.getPath(), pathStatus: 256} + waitsFor -> + statusHandler.callCount == 1 + runs -> + expect(statusHandler.callCount).toBe 1 + expect(statusHandler).toHaveBeenCalledWith {path: buffer.getPath(), pathStatus: 256}