Move spec for scoped property loading to atom-spec

This commit is contained in:
Corey Johnson & Nathan Sobo 2013-03-26 12:17:05 -06:00 committed by Nathan Sobo
parent 3c561ef208
commit 368e10a9f5
2 changed files with 5 additions and 10 deletions

View File

@ -47,13 +47,3 @@ describe "AtomPackage", ->
expect(packageMainModule.activationEventCallCount).toBe 2
expect(eventHandler.callCount).toBe 2
expect(packageMainModule.activate.callCount).toBe 1
describe "when the package has a scoped properties directory", ->
it "loads the scoped properties", ->
spyOn(syntax, 'addProperties')
atom.activatePackage("package-with-scoped-properties")
expect(syntax.addProperties).toHaveBeenCalled()
[selector, properties] = syntax.addProperties.argsForCall[0]
expect(selector).toBe ".source.omg"
expect(properties).toEqual {editor: increaseIndentPattern: '^a'}

View File

@ -124,6 +124,11 @@ describe "the `atom` global", ->
expect(syntax.selectGrammar('a.alot').name).toBe 'Alot'
expect(syntax.selectGrammar('a.alittle').name).toBe 'Alittle'
describe "scoped-property loading", ->
it "loads the scoped properties", ->
atom.activatePackage("package-with-scoped-properties")
expect(syntax.getProperty ['.source.omg'], 'editor.increaseIndentPattern').toBe '^a'
describe "textmate packages", ->
it "loads the package's grammars", ->
expect(syntax.selectGrammar("file.rb").name).toBe "Null Grammar"