From b0c67741e09cb6d9d2cff59ecda3e98280bd5ea8 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 13 Feb 2012 15:35:06 -0700 Subject: [PATCH] :lipstick: --- spec/atom/line-wrapper-spec.coffee | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/spec/atom/line-wrapper-spec.coffee b/spec/atom/line-wrapper-spec.coffee index 67860572b..e5de73434 100644 --- a/spec/atom/line-wrapper-spec.coffee +++ b/spec/atom/line-wrapper-spec.coffee @@ -29,9 +29,9 @@ describe "LineWrapper", -> describe "when the number of screen lines remains the same for the changed buffer line", -> it "re-wraps the existing lines and emits a change event for all its screen lines", -> buffer.insert([6, 28], '1234567') - expect(tokensText(wrapper.screenLineForRow(7).tokens)).toBe ' current < pivot ? left1234567.push(current) ' - expect(tokensText(wrapper.screenLineForRow(8).tokens)).toBe ': right.push(current);' - expect(tokensText(wrapper.screenLineForRow(9).tokens)).toBe ' }' + expect(wrapper.screenLineForRow(7).text).toBe ' current < pivot ? left1234567.push(current) ' + expect(wrapper.screenLineForRow(8).text).toBe ': right.push(current);' + expect(wrapper.screenLineForRow(9).text).toBe ' }' expect(changeHandler).toHaveBeenCalled() [event] = changeHandler.argsForCall[0] @@ -41,10 +41,10 @@ describe "LineWrapper", -> describe "when the number of screen lines increases for the changed buffer line", -> it "re-wraps and adds an additional screen line and emits a change event for all screen lines", -> buffer.insert([6, 28], '1234567890') - expect(tokensText(wrapper.screenLineForRow(7).tokens)).toBe ' current < pivot ? ' - expect(tokensText(wrapper.screenLineForRow(8).tokens)).toBe 'left1234567890.push(current) : ' - expect(tokensText(wrapper.screenLineForRow(9).tokens)).toBe 'right.push(current);' - expect(tokensText(wrapper.screenLineForRow(10).tokens)).toBe ' }' + expect(wrapper.screenLineForRow(7).text).toBe ' current < pivot ? ' + expect(wrapper.screenLineForRow(8).text).toBe 'left1234567890.push(current) : ' + expect(wrapper.screenLineForRow(9).text).toBe 'right.push(current);' + expect(wrapper.screenLineForRow(10).text).toBe ' }' expect(changeHandler).toHaveBeenCalled() [event] = changeHandler.argsForCall[0] @@ -54,8 +54,8 @@ describe "LineWrapper", -> describe "when the number of screen lines decreases for the changed buffer line", -> it "re-wraps and removes a screen line and emits a change event for all screen lines", -> buffer.change(new Range([6, 24], [6, 42]), '') - expect(tokensText(wrapper.screenLineForRow(7).tokens)).toBe ' current < pivot ? : right.push(current);' - expect(tokensText(wrapper.screenLineForRow(8).tokens)).toBe ' }' + expect(wrapper.screenLineForRow(7).text).toBe ' current < pivot ? : right.push(current);' + expect(wrapper.screenLineForRow(8).text).toBe ' }' expect(changeHandler).toHaveBeenCalled() [event] = changeHandler.argsForCall[0] @@ -65,10 +65,10 @@ describe "LineWrapper", -> describe "when buffer lines are inserted", -> it "re-wraps existing and new screen lines and emits a change event", -> buffer.insert([6, 21], '1234567890 abcdefghij 1234567890\nabcdefghij') - expect(tokensText(wrapper.screenLineForRow(7).tokens)).toBe ' current < pivot1234567890 abcdefghij ' - expect(tokensText(wrapper.screenLineForRow(8).tokens)).toBe '1234567890' - expect(tokensText(wrapper.screenLineForRow(9).tokens)).toBe 'abcdefghij ? left.push(current) : ' - expect(tokensText(wrapper.screenLineForRow(10).tokens)).toBe 'right.push(current);' + expect(wrapper.screenLineForRow(7).text).toBe ' current < pivot1234567890 abcdefghij ' + expect(wrapper.screenLineForRow(8).text).toBe '1234567890' + expect(wrapper.screenLineForRow(9).text).toBe 'abcdefghij ? left.push(current) : ' + expect(wrapper.screenLineForRow(10).text).toBe 'right.push(current);' expect(changeHandler).toHaveBeenCalled() [event] = changeHandler.argsForCall[0] @@ -78,10 +78,10 @@ describe "LineWrapper", -> describe "when buffer lines are removed", -> it "removes screen lines and emits a change event", -> buffer.change(new Range([3, 21], [7, 5]), ';') - expect(tokensText(wrapper.screenLineForRow(3).tokens)).toBe ' var pivot = items;' - expect(tokensText(wrapper.screenLineForRow(4).tokens)).toBe ' return ' - expect(tokensText(wrapper.screenLineForRow(5).tokens)).toBe 'sort(left).concat(pivot).concat(sort(right));' - expect(tokensText(wrapper.screenLineForRow(6).tokens)).toBe ' };' + expect(wrapper.screenLineForRow(3).text).toBe ' var pivot = items;' + expect(wrapper.screenLineForRow(4).text).toBe ' return ' + expect(wrapper.screenLineForRow(5).text).toBe 'sort(left).concat(pivot).concat(sort(right));' + expect(wrapper.screenLineForRow(6).text).toBe ' };' expect(changeHandler).toHaveBeenCalled() [event] = changeHandler.argsForCall[0]