From ef9bb5a2594ef5dd6c9232153b9f6105dc2b9718 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Fri, 23 Mar 2012 09:50:41 -0700 Subject: [PATCH] :lipstick --- spec/atom/editor-spec.coffee | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/atom/editor-spec.coffee b/spec/atom/editor-spec.coffee index fd78c24c0..ed6e08174 100644 --- a/spec/atom/editor-spec.coffee +++ b/spec/atom/editor-spec.coffee @@ -18,6 +18,14 @@ describe "Editor", -> editor.setBuffer(buffer) editor.isFocused = true + describe "construction", -> + it "assigns an empty buffer and correctly handles text input (regression coverage)", -> + editor = new Editor + expect(editor.buffer.path).toBeUndefined() + expect(editor.lines.find('.line').length).toBe 1 + editor.insertText('x') + expect(editor.lines.find('.line').length).toBe 1 + describe "text rendering", -> it "creates a line element for each line in the buffer with the html-escaped text of the line", -> expect(editor.lines.find('.line').length).toEqual(buffer.numLines()) @@ -936,14 +944,6 @@ describe "Editor", -> expect(editor.isFocused).toBeFalsy() expect(editor).not.toHaveClass('focused') - describe "construction", -> - it "assigns an empty buffer and correctly handles text input (regression coverage)", -> - editor = new Editor - expect(editor.buffer.path).toBeUndefined() - expect(editor.lines.find('.line').length).toBe 1 - editor.insertText('x') - expect(editor.lines.find('.line').length).toBe 1 - describe ".setBuffer(buffer)", -> it "sets the cursor to the beginning of the file", -> expect(editor.getCursorScreenPosition()).toEqual(row: 0, column: 0)