       expect(editor.getText()).toBe "012345\n\nabcdef"
 
   describe "the s keybinding", ->
-    it "deletes the character to the right and enters insert mode", ->
-      editor.setText("012345")
-      editor.setCursorScreenPosition([0, 0])
-
-      keydown('s', element: editor[0])
-      expect(editor).toHaveClass 'insert-mode'
-      expect(editor.getText()).toBe '12345'
-      expect(editor.getCursorScreenPosition()).toEqual [0, 0]
-      expect(vimState.getRegister('"').text).toBe '0'
-
-    it "deletes count characters to the right and enters insert mode", ->
+    beforeEach ->
       editor.setText("012345")
       editor.setCursorScreenPosition([0, 1])
 
+    it "deletes the character to the right and enters insert mode", ->
+      keydown('s', element: editor[0])
+
+      expect(editor).toHaveClass 'insert-mode'
+      expect(editor.getText()).toBe '02345'
+      expect(editor.getCursorScreenPosition()).toEqual [0, 1]
+      expect(vimState.getRegister('"').text).toBe '1'
+
+    it "deletes count characters to the right and enters insert mode", ->
       keydown('3', element: editor[0])
       keydown('s', element: editor[0])
+
       expect(editor).toHaveClass 'insert-mode'
       expect(editor.getText()).toBe '045'
       expect(editor.getCursorScreenPosition()).toEqual [0, 1]


        keydown('d', element: editor[0])
        keydown('d', element: editor[0])
        expect(editor.getText()).toBe "12345\n\nABCDE"
        expect(editor.getCursorScreenPosition()).toEqual([1,0])
        expect(vimState.getRegister('"').text).toBe "abcde\n"


    it "doesn't linewrap", ->
      editor.setCursorScreenPosition [0, 3]

      keydown('a', element: editor[0])

      expect(editor.getCursorScreenPosition()).toEqual [0,3]
