 
     describe "when the root view is opened to a file path", ->
       it "does not attach to the root view but does create a root node when initialized", ->
-        atom.deactivatePackage("tree-view")
+        atom.packages.deactivatePackage("tree-view")
         atom.packages.packageStates = {}
         atom.rootView.openSync('tree-view.js')
-        treeView = atom.activatePackage("tree-view").mainModule.createView()
+        treeView = atom.packages.activatePackage("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 = atom.activatePackage("tree-view").mainModule.createView()
+        treeView = atom.packages.activatePackage("tree-view").mainModule.createView()
         expect(treeView.hasParent()).toBeTruthy()
         expect(treeView.root).toExist()
 

    describe "when the project has no path", ->
      beforeEach ->
        atom.project.setPath(undefined)
        atom.deactivatePackage("tree-view")
        treeView = atom.activatePackage("tree-view").mainModule.createView()

      it "does not attach to the root view or create a root node when initialized", ->
        expect(treeView.hasParent()).toBeFalsy()

        dotGit = path.join(temp.mkdirSync('repo'), '.git')
        fs.makeTreeSync(dotGit)
        atom.project.setPath(dotGit)
        atom.packages.deactivatePackage("tree-view")
        atom.packages.packageStates = {}
        {treeView} = atom.packages.activatePackage("tree-view").mainModule
        expect(treeView).toBeFalsy()

  describe "serialization", ->
