       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)
+      ensureKeystroke 'di<',
+        text: "<>"
+        cursor: [0, 1]
 
     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)
+      ensureKeystroke 'di<',
+        text: "< something in here and in <> >"
+        cursor: [0, 28]
 
   describe "the 'it' text object", ->
     beforeEach ->

      cursor [0, 9]

    it "applies operators around the current square brackets in operator-pending mode", ->
      keystroke 'da['
      text().toBe ""
      cursor().toEqual [0, 0]
      classListContains('operator-pending-mode').toBe(false)
      classListContains('normal-mode').toBe(true)

    it "applies operators around the current square brackets in operator-pending mode (second test)", ->
      cursor [0, 29]
      keystroke 'da['
      text().toBe "[ something in here and in  ]"
      cursor().toEqual [0, 27]
      classListContains('operator-pending-mode').toBe(false)
      classListContains('normal-mode').toBe(true)

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

      cursor [0, 9]

    it "applies operators inside the current string in operator-pending mode", ->
      ensureKeystroke "di'",
        text: "''here' ' and over here"
        cursor: [0, 1]

    # I don't like old behavior, that was not in Vim and furthermore, this is counter intuitive.
    # Simply selecting area between quote is that normal user expects.
    # it "applies operators inside the next string in operator-pending mode (if not in a string)", ->
    it "[Changed behavior] applies operators inside area between quote", ->
      cursor [0, 29]
      ensureKeystroke "di'",
        text: "' something in here and in '' ' and over here"
        cursor: [0, 28]

    it "makes no change if past the last string on a line", ->
      cursor [0, 39]
      ensureKeystroke "di'",
        text: "' something in here and in 'here' ' and over here"
        cursor: [0, 39]

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