     waitsForPromise -> atom.packages.activatePackage('table-edit')
 
   describe 'when a csv file is opened', ->
-    [csvDest, projectPath, openSpy, destroySpy] = []
+    [csvDest, projectPath, tableEditor, tableEditorElement, openSpy, destroySpy, savedContent, spy] = []
 
     sleep = (ms) ->
       start = new Date


    describe 'when the user choose to open a table editor', ->
      describe 'with the default options', ->
        [tableEditor, tableEditorElement] = []

        beforeEach ->
          csvEditor.onDidOpen ({editor}) ->
            tableEditor = editor


        describe 'when the table is modified', ->
          beforeEach ->
            modifyAndSave ->
              tableEditor.addRow ['Bill', 45, 'male']
              tableEditor.addRow ['Bonnie', 42, 'female']

          describe 'when saved', ->
            it 'save the new csv content on disk', ->
              expect(savedContent).toEqual("""
              name,age,gender
              Jane,32,female
              John,30,male
