💄 Harmonize lineForRow calls in specs

This commit is contained in:
abe33
2014-05-09 00:02:31 +02:00
parent 5a5cb869e2
commit 554165ca48

View File

@@ -2070,31 +2070,31 @@ describe "Editor", ->
'sort'
])
describe ".pasteText()", ->
fdescribe ".pasteText()", ->
it "pastes text into the buffer", ->
atom.clipboard.write('first')
editor.pasteText()
expect(editor.buffer.lineForRow(0)).toBe "var first = function () {"
expect(buffer.lineForRow(1)).toBe " var first = function(items) {"
expect(editor.lineForBufferRow(0)).toBe "var first = function () {"
expect(editor.lineForBufferRow(1)).toBe " var first = function(items) {"
describe 'when the clipboard has many selections', ->
it "pastes each selection separately into the buffer", ->
atom.clipboard.write('first\nsecond', {selections: ['first', 'second'] })
editor.pasteText()
expect(editor.buffer.lineForRow(0)).toBe "var first = function () {"
expect(buffer.lineForRow(1)).toBe " var second = function(items) {"
expect(editor.lineForBufferRow(0)).toBe "var first = function () {"
expect(editor.lineForBufferRow(1)).toBe " var second = function(items) {"
describe 'and the selections count does not match', ->
it "pastes the whole text into the buffer", ->
atom.clipboard.write('first\nsecond\nthird', {selections: ['first', 'second', 'third'] })
editor.pasteText()
expect(editor.buffer.lineForRow(0)).toBe "var first"
expect(buffer.lineForRow(1)).toBe "second"
expect(buffer.lineForRow(2)).toBe "third = function () {"
expect(editor.lineForBufferRow(0)).toBe "var first"
expect(editor.lineForBufferRow(1)).toBe "second"
expect(editor.lineForBufferRow(2)).toBe "third = function () {"
expect(editor.buffer.lineForRow(3)).toBe " var first"
expect(buffer.lineForRow(4)).toBe "second"
expect(buffer.lineForRow(5)).toBe "third = function(items) {"
expect(editor.lineForBufferRow(3)).toBe " var first"
expect(editor.lineForBufferRow(4)).toBe "second"
expect(editor.lineForBufferRow(5)).toBe "third = function(items) {"
describe ".indentSelectedRows()", ->
describe "when nothing is selected", ->