 
     it "can be undone in one go", ->
       keydown 'a'
-      editor.setText("abc")
+      editor.insertText("abc")
       keydown 'escape'
       expect(editor.getText()).toBe "abc"
       keydown 'u'


    it "repeats correctly", ->
      keydown 'a'
      editor.setText("abc")
      keydown 'escape'
      expect(editor.getText()).toBe "abc"
      keydown '.'


    it "allows undoing an entire batch of typing", ->
      keydown 'i'
      editor.insertText("abc")
      keydown 'escape'
      keydown 'i'
      editor.insertText("def")
      keydown 'escape'
      expect(editor.getText()).toBe "abdefc"
      keydown 'u'
      expect(editor.getText()).toBe "abc"
      keydown 'u'
