           console.log('Hello "World"');
           console.log('');
         """
-        editor.setGrammar(atom.syntax.selectGrammar('test.js'))
+        editor.setGrammar(atom.grammars.selectGrammar('test.js'))
 
     describe "when the cursor is not inside a quoted string", ->
       it "does nothing", ->

    describe "when the cursor is on an invalid region", ->
      describe "when it is quoted", ->
        it "toggles the quotes", ->
          editor.setGrammar(atom.syntax.selectGrammar('test.json'))
          editor.setText("{'invalid': true}")
          editor.setCursorBufferPosition([0, 4])
          toggleQuotes(editor)

        editor.setCursorBufferPosition([1, 8])
        toggleQuotes(editor)
        expect(editor.lineForBufferRow(1)).toBe 'print(r"")'
        expect(editor.getCursorBufferPosition()).toEqual [1, 8]
