diff --git a/spec/pane-spec.coffee b/spec/pane-spec.coffee index 00861a5de..89bb60ca7 100644 --- a/spec/pane-spec.coffee +++ b/spec/pane-spec.coffee @@ -125,6 +125,14 @@ describe "Pane", -> pane.items[1].destroy() expect(pane.items).toEqual [item1, item3] + describe "::destroyInactiveItems()", -> + it "destroys all items but the active item", -> + pane = new Pane(items: [new Item("A"), new Item("B"), new Item("C")]) + [item1, item2, item3] = pane.items + pane.activateItem(item2) + pane.destroyInactiveItems() + expect(pane.items).toEqual [item2] + describe "::moveItem(item, index)", -> it "moves the item to the given index and emits an 'item-moved' event with the item and its new index", -> pane = new Pane(items: [new Item("A"), new Item("B"), new Item("C"), new Item("D")]) diff --git a/spec/pane-view-spec.coffee b/spec/pane-view-spec.coffee index 4ada7e21b..d3c819301 100644 --- a/spec/pane-view-spec.coffee +++ b/spec/pane-view-spec.coffee @@ -138,13 +138,6 @@ describe "PaneView", -> paneModel2.activateItemAtIndex(1) expect(view1.data('preservative')).toBe 1234 - describe "pane:close-other-items", -> - it "destroys all items except the current", -> - pane.activateItem(editor1) - pane.trigger 'pane:close-other-items' - expect(editor2.isDestroyed()).toBe true - expect(pane.getItems()).toEqual [editor1] - describe "::saveActiveItem()", -> describe "when the current item has a uri", -> describe "when the current item has a save method", ->