           print(u"Hello World")
           print(r'')
         """
-        editor.setGrammar(atom.syntax.selectGrammar('test.py'))
+        editor.setGrammar(atom.grammars.selectGrammar('test.py'))
 
     describe "when cursor is inside a double quoted unicode string", ->
       it "switches quotes to single excluding unicode character", ->

    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)


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