Make test more consistent

This commit is contained in:
probablycorey 2013-10-10 10:34:02 -07:00
parent 6abb5a2390
commit 7c6f9b1a81

View File

@ -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