       cursor [3, 2]
 
     it "applies operators around the current paragraph in operator-pending mode", ->
-      keystroke 'yap'
-      text().toBe "text\n\nParagraph-1\nParagraph-1\nParagraph-1\n\nmoretext"
-      cursor().toEqual [2, 0]
-      register('"').toBe "Paragraph-1\nParagraph-1\nParagraph-1\n\n"
-      classListContains('operator-pending-mode').toBe(false)
-      classListContains('normal-mode').toBe(true)
+      ensureKeystroke 'yap',
+        text: "text\n\nParagraph-1\nParagraph-1\nParagraph-1\n\nmoretext"
+        cursor: [2, 0]
+        register: "Paragraph-1\nParagraph-1\nParagraph-1\n\n"
 
     it "selects around the current paragraph in visual mode", ->
-      keystroke 'vap'
-      selectedScreenRange().toEqual [[2, 0], [6, 0]]
+      ensureKeystroke 'vap',
+        selectedScreenRange: [[2, 0], [6, 0]]
 
   describe "the 'i[' text object", ->
     beforeEach ->

      cursor [0, 9]

    it "applies operators inside the current word in operator-pending mode", ->
      keystroke 'di{'
      text().toBe "{}"
      cursor().toEqual [0, 1]
      classListContains('operator-pending-mode').toBe(false)
      classListContains('normal-mode').toBe(true)

    it "applies operators inside the current word in operator-pending mode (second test)", ->
      cursor [0, 29]
      keystroke 'di{'
      text().toBe "{ something in here and in {} }"
      cursor().toEqual [0, 28]
      classListContains('operator-pending-mode').toBe(false)
      classListContains('normal-mode').toBe(true)

  describe "the 'i<' text object", ->
    beforeEach ->

      cursor [0, 9]

    it "applies operators around the current parentheses in operator-pending mode", ->
      ensureKeystroke 'da(',
        text: ''
        cursor: [0, 0]

    it "applies operators around the current parentheses in operator-pending mode (second test)", ->
      cursor [0, 29]
      ensureKeystroke 'da(',
        text: "( something in here and in  )"
        cursor: [0, 27]

  describe "the 'a{' text object", ->
    beforeEach ->
