From 39fb14e5f5d2f6aeb151b48920fe3c210eb2d272 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 31 May 2012 10:57:04 -0600 Subject: [PATCH] Add a spec for line number updates after folding/unfolding --- spec/app/editor-spec.coffee | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/app/editor-spec.coffee b/spec/app/editor-spec.coffee index 4b68eba01..a4295f2af 100644 --- a/spec/app/editor-spec.coffee +++ b/spec/app/editor-spec.coffee @@ -8,7 +8,7 @@ $ = require 'jquery' _ = require 'underscore' fs = require 'fs' -fdescribe "Editor", -> +describe "Editor", -> [rootView, buffer, editor, cachedLineHeight] = [] getLineHeight = -> @@ -463,6 +463,13 @@ fdescribe "Editor", -> otherEditor.simulateDomAttachment() expect(otherEditor.setMaxLineLength).toHaveBeenCalled() + describe "when lines are folded and then unfolded", -> + it "renders the lines and line numbers correctly after unfolding", -> + editor.createFold(2, 9).destroy() + + expect(editor.gutter.find('.line-number:last').text()).toBe '13' + expect(editor.gutter.find('.line-number').length).toBe 13 + describe "when some lines at the end of the buffer are not visible on screen", -> beforeEach -> editor.attachToDom(heightInLines: 5.5)