 
       describe "when it is not quoted", ->
         it "does not toggle the quotes", ->
-          editor.setGrammar(atom.syntax.selectGrammar('test.json'))
+          editor.setGrammar(atom.grammars.selectGrammar('test.json'))
           editor.setText("{invalid: true}")
           editor.setCursorBufferPosition([0, 4])
           toggleQuotes(editor)

    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)

          console.log('Hello "World"');
          console.log('');
        """
        editor.setGrammar(atom.grammars.selectGrammar('test.js'))

    describe "when the cursor is not inside a quoted string", ->
      it "does nothing", ->
