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)