 
   describe "when tool-panel:unfocus is triggered on the tree view", ->
     it "surrenders focus to the root view but remains open", ->
-      rootView.open() # When we trigger 'tool-panel:unfocus' below, we want an editor to become focused
+      rootView.openSync() # When we trigger 'tool-panel:unfocus' below, we want an editor to become focused
       rootView.attachToDom()
       treeView.focus()
       expect(treeView.list).toMatchSelector(':focus')

TreeView = require '../lib/tree-view'
path = require 'path'
temp = require 'temp'

describe "TreeView", ->
  [treeView, sampleJs, sampleTxt] = []


      describe "when the project is assigned a path because a new buffer is saved", ->
        it "creates a root directory view but does not attach to the root view", ->
          rootView.openSync()
          rootView.getActivePaneItem().saveAs("/tmp/test.txt")
          expect(treeView.hasParent()).toBeFalsy()
          expect(treeView.root.getPath()).toBe '/tmp'
