Add spec for disabling spell check of a grammar

This commit is contained in:
Kevin Sawicki 2013-02-27 08:36:58 -08:00
parent 2f8b8c4fc7
commit 1f4df2878f

View File

@ -45,3 +45,17 @@ describe "Spell check", ->
editor.insertText('a')
advanceClock(editor.getBuffer().stoppedChangingDelay)
expect(editor.find('.misspelling')).toBeHidden()
describe "when spell checking for a grammar is removed", ->
it "removes all current decorations", ->
editor.setText('notaword')
advanceClock(editor.getBuffer().stoppedChangingDelay)
config.set('spell-check.grammars', ['source.js'])
waitsFor ->
editor.find('.misspelling').length > 0
runs ->
expect(editor.find('.misspelling').length).toBe 1
config.set('spell-check.grammars', [])
expect(editor.find('.misspelling').length).toBe 0