     describe "tree-view:remove", ->
       it "won't remove the root directory", ->
         spyOn(atom, 'confirm')
-        atom.workspaceView.attachToDom()
+        jasmine.attachToDOM(workspaceElement)
         treeView.show()
         treeView.root.click()
         treeView.trigger 'tree-view:remove'


        describe "when the move dialog's editor loses focus", ->
          it "removes the dialog and focuses root view", ->
            atom.workspaceView.attachToDom()
            atom.workspaceView.focus()
            expect(moveDialog.parent()).not.toExist()
            expect(atom.workspaceView.getActiveView().isFocused).toBeTruthy()

      describe "when a file is selected that's name starts with a '.'", ->
        [dotFilePath, dotFileView, moveDialog] = []

        it "doesn't display the copy dialog", ->
          treeView.root.click()
          treeView.trigger "tree-view:duplicate"
          expect(atom.workspace.getModalPanels().length).toBe(0)

      describe "when the editor has focus", ->
        copyDialog = null
