From 7c6f9b1a81b150caa7d2b45b7fcd59f69414c628 Mon Sep 17 00:00:00 2001 From: probablycorey Date: Thu, 10 Oct 2013 10:34:02 -0700 Subject: [PATCH] Make test more consistent --- spec/root-view-spec.coffee | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spec/root-view-spec.coffee b/spec/root-view-spec.coffee index b5798d3bc..94483cb6a 100644 --- a/spec/root-view-spec.coffee +++ b/spec/root-view-spec.coffee @@ -291,14 +291,16 @@ describe "RootView", -> describe "when called with no path", -> it "creates a empty edit session as an item on a new pane, and focuses the pane", -> - promise = rootView.openAsync().then (editSession) -> + editSession = null + + waitsForPromise -> + rootView.openAsync().then (o) -> editSession = o + + runs -> expect(rootView.getActivePane().activeItem).toBe editSession expect(editSession.getPath()).toBeUndefined() expect(rootView.getActivePane().focus).toHaveBeenCalled() - waitsForPromise -> - promise - it "can create multiple empty edit sessions as items on a pane", -> editSession1 = null editSession2 = null