From 52fe580cf60a53e1dd06d48bf99aa6b774be4605 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Thu, 17 May 2012 10:17:05 -0700 Subject: [PATCH] Test that inserting lines re-renders the gutter --- spec/app/editor-spec.coffee | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/app/editor-spec.coffee b/spec/app/editor-spec.coffee index f0fe1a591..63327acfd 100644 --- a/spec/app/editor-spec.coffee +++ b/spec/app/editor-spec.coffee @@ -567,6 +567,12 @@ describe "Editor", -> editor.insertText(oneHundredLines) expect(editor.gutter.lineNumbers.outerWidth()).toBe editor.charWidth * 3 + describe "when the insertion of lines causes the editor to scroll", -> + it "renders line numbers correctly", -> + oneHundredLines = [0..100].join("\n") + editor.insertText(oneHundredLines) + expect(editor.gutter.lineNumbers.find('.line-number').length).toBe 6 + describe "when wrapping is on", -> it "renders a • instead of line number for wrapped portions of lines", -> editor.setMaxLineLength(50)