           tabBar.onDrop(dropEvent)
 
           expect(tabBar.getTabs().map (tab) -> tab.text()).toEqual ["sample.js", "Item 1", "Item 2"]
-          expect(pane.getItems()).toEqual [editSession1, item1, item2]
+          expect(pane.getItems()).toEqual [editor1, item1, item2]
           expect(pane.activeItem).toBe item1
           expect(pane.focus).toHaveBeenCalled()
 
       describe "when it is dropped on a tab that's earlier in the list", ->
         it "moves the tab and its item, shows the tab's item, and focuses the pane", ->
           expect(tabBar.getTabs().map (tab) -> tab.text()).toEqual ["Item 1", "sample.js", "Item 2"]
-          expect(pane.getItems()).toEqual [item1, editSession1, item2]
+          expect(pane.getItems()).toEqual [item1, editor1, item2]
           expect(pane.activeItem).toBe item2
           spyOn(pane, 'focus')
 

      expect(tabBar.tabAtIndex(1).find('.title')).toHaveText 'Item 3'

    it "adds the 'modified' class to the new tab if the item is initially modified", ->
      editSession2 = atom.project.openSync('sample.txt')
      editSession2.insertText('x')
      pane.showItem(editSession2)
      expect(tabBar.tabForItem(editSession2)).toHaveClass 'modified'

  describe "when an item is removed from the pane", ->
    it "removes the item's tab from the tab bar", ->

          tabBar.onDrop(dropEvent)

          expect(tabBar.getTabs().map (tab) -> tab.text()).toEqual ["sample.js", "Item 2", "Item 1"]
          expect(pane.getItems()).toEqual [editor1, item2, item1]

    describe "when a tab is dragged to a different pane", ->
      [pane2, tabBar2, item2b] = []
