         expect(pane.getItems().length).toBe 1
         expect(tabBar).toHaveClass 'hidden'
 
-  if atom.workspace.buildTextEditor().isPending?
+  if atom.workspace.buildTextEditor().isPending? or atom.workspace.getActivePane().getActiveItem?
+    isPending = (item) ->
+      if item.isPending?
+        item.isPending()
+      else
+        atom.workspace.getActivePane().getPendingItem() is item
+
     describe "when tab's pane item is pending", ->
       beforeEach ->
         pane.destroyItems()


          runs ->
            pane.activateItem(editor1)
            expect(editor1.isPending()).toBe true
            atom.commands.dispatch(atom.views.getView(atom.workspace.getActivePane()), 'tabs:keep-pending-tab')
            expect(editor1.isPending()).toBe false

      describe "when there is a temp tab already", ->
        it "it will replace an existing temporary tab", ->

          tabBar2 = new TabBarView
          tabBar2.initialize(pane2)
          newEditor = pane2.getActiveItem()
          expect(isPending(newEditor)).toBe false
          expect($(tabBar2.tabForItem(newEditor)).find('.title')).not.toHaveClass 'temp'

        it "keeps the pending tab in the old pane", ->
          expect(isPending(editor1)).toBe true
          expect($(tabBar.tabForItem(editor1)).find('.title')).toHaveClass 'temp'

      describe "when dragging a pending tab to a different pane", ->
