From 3f848606eefa9a486ec6e25640e77382a04203a7 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 23 Aug 2013 09:26:56 -0700 Subject: [PATCH] Use setEditorWidthInChars to resize editor This makes the comparisons for the soft wrap column more sane. --- spec/editor-spec.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/editor-spec.coffee b/spec/editor-spec.coffee index 236d7c561..d2a4b1de0 100644 --- a/spec/editor-spec.coffee +++ b/spec/editor-spec.coffee @@ -2674,7 +2674,8 @@ describe "Editor", -> describe "when the window is resized", -> it "updates the active edit session with the current soft wrap column", -> editor.attachToDom() - expect(editor.activeEditSession.getSoftWrapColumn()).toBe 78 - editor.width(editor.width() * 2) + setEditorWidthInChars(editor, 50) + expect(editor.activeEditSession.getSoftWrapColumn()).toBe 50 + setEditorWidthInChars(editor, 100) $(window).trigger 'resize' - expect(editor.activeEditSession.getSoftWrapColumn()).toBe 155 + expect(editor.activeEditSession.getSoftWrapColumn()).toBe 100