       window.rootView = RootView.deserialize(rootViewState)
 
       rootView.attachToDom()
-      window.loadPackage("tree-view")
+      atom.activatePackage("tree-view")
       treeView = rootView.find(".tree-view").view()
       expect(treeView.find(".tree-view")).toMatchSelector ':focus'
 

        rootView.deactivate()
        window.rootView = new RootView
        rootView.open('tree-view.js')
        treeView = window.loadPackage("tree-view").mainModule.createView()
        expect(treeView.hasParent()).toBeFalsy()
        expect(treeView.root).toExist()

    describe "when the root view is opened to a directory", ->
      it "attaches to the root view", ->
        treeView = window.loadPackage("tree-view").mainModule.createView()
        expect(treeView.hasParent()).toBeTruthy()
        expect(treeView.root).toExist()


    project.setPath(project.resolve('tree-view'))
    window.rootView = new RootView

    atom.activatePackage("tree-view")
    rootView.trigger 'tree-view:toggle'
    treeView = rootView.find(".tree-view").view()
    treeView.root = treeView.find('ol > li:first').view()
