 describe "Autocomplete", ->
   beforeEach ->
     window.rootView = new RootView
-    rootView.open('sample.js')
+    rootView.openSync('sample.js')
     rootView.simulateDomAttachment()
 
   describe "@activate()", ->


  it "includes completions for the scope's completion preferences", ->
    atom.activatePackage('css-tmbundle', sync: true)
    cssEditor = new Editor(editSession: project.open('css.css'))
    autocomplete = new AutocompleteView(cssEditor)

    cssEditor.attachToDom()

      describe "when `autocomplete.includeCompletionsFromAllBuffers` is true", ->
        it "shows words from all open buffers", ->
          config.set('autocomplete.includeCompletionsFromAllBuffers', true)
          project.openSync('sample.txt')
          editor.getBuffer().insert([10,0] ,"extra:SO:extra")
          editor.setCursorBufferPosition([10,8])
          autocomplete.attach()
