From 7822e2c6768ffd7009a70414917dab94fc67f1ec Mon Sep 17 00:00:00 2001 From: Luke Pommersheim Date: Mon, 31 Aug 2015 20:22:24 +0200 Subject: [PATCH] :tulip: change the spec for consolidateSelections --- spec/text-editor-spec.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/text-editor-spec.coffee b/spec/text-editor-spec.coffee index 7d9e17dc2..b44edab4b 100644 --- a/spec/text-editor-spec.coffee +++ b/spec/text-editor-spec.coffee @@ -1883,7 +1883,7 @@ describe "TextEditor", -> expect(editor.getSelectedBufferRanges()).toEqual [[[0, 0], [0, 3]]] describe ".consolidateSelections()", -> - it "destroys all selections but the most recent, returning true if any selections were destroyed", -> + it "destroys all selections until the first, original, selections returning true if any selections were destroyed", -> editor.setSelectedBufferRange([[3, 16], [3, 21]]) selection1 = editor.getLastSelection() selection2 = editor.addSelectionForBufferRange([[3, 25], [3, 34]]) @@ -1891,10 +1891,10 @@ describe "TextEditor", -> expect(editor.getSelections()).toEqual [selection1, selection2, selection3] expect(editor.consolidateSelections()).toBeTruthy() - expect(editor.getSelections()).toEqual [selection3] - expect(selection3.isEmpty()).toBeFalsy() + expect(editor.getSelections()).toEqual [selection1] + expect(selection1.isEmpty()).toBeFalsy() expect(editor.consolidateSelections()).toBeFalsy() - expect(editor.getSelections()).toEqual [selection3] + expect(editor.getSelections()).toEqual [selection1] describe "when the cursor is moved while there is a selection", -> makeSelection = -> selection.setBufferRange [[1, 2], [1, 5]]