       atom.config.set('spell-check.grammars', ['source.js'])
 
       waitsFor ->
-        getMisspellingMarkers().length > 0
-
-      runs ->
-        expect(getMisspellingMarkers().length).toBe 2
+        getMisspellingMarkers().length is 2
+
+      runs ->
         editor.destroy()
         expect(getMisspellingMarkers().length).toBe 0
 

      atom.config.set('spell-check.grammars', ['source.js'])

      waitsFor ->
        getMisspellingMarkers().length > 0

      runs ->
        expect(getMisspellingMarkers().length).toBe 1
        atom.config.set('spell-check.grammars', [])
        expect(getMisspellingMarkers().length).toBe 0


    misspellingMarkers = null
    waitsFor ->
      misspellingMarkers = getMisspellingMarkers()
      misspellingMarkers.length is 4

    runs ->
      expect(textForMarker(misspellingMarkers[0])).toEqual "thiss"
      expect(textForMarker(misspellingMarkers[1])).toEqual "sentencts"
      expect(textForMarker(misspellingMarkers[2])).toEqual "edn"
