       runs -> expect(pane.activate.callCount).toBe 2
 
     it "closes the tab when middle clicked", ->
+      jasmine.attachToDOM(tabBar) # Remove after Atom 1.2.0 is released
+
       event = triggerMouseEvent('mousedown', tabBar.tabForItem(editor1), which: 2)
 
       expect(pane.getItems().length).toBe 2

    beforeEach ->
      paneElement = atom.views.getView(pane)
      paneElement.insertBefore(tabBar, paneElement.firstChild)

    describe "when tabs:close-tab is fired", ->
      it "closes the active tab", ->


  describe "when a tab is clicked", ->
    it "shows the associated item on the pane and focuses the pane", ->
      jasmine.attachToDOM(tabBar) # Remove after Atom 1.2.0 is released

      spyOn(pane, 'activate')

      event = triggerMouseEvent('mousedown', tabBar.tabAtIndex(0), which: 1)
