From 368e10a9f50ded7cf65dab01e95a9b56232612e0 Mon Sep 17 00:00:00 2001 From: Corey Johnson & Nathan Sobo Date: Tue, 26 Mar 2013 12:17:05 -0600 Subject: [PATCH] Move spec for scoped property loading to atom-spec --- spec/app/atom-package-spec.coffee | 10 ---------- spec/app/atom-spec.coffee | 5 +++++ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/spec/app/atom-package-spec.coffee b/spec/app/atom-package-spec.coffee index fdf298f51..d68359219 100644 --- a/spec/app/atom-package-spec.coffee +++ b/spec/app/atom-package-spec.coffee @@ -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'} diff --git a/spec/app/atom-spec.coffee b/spec/app/atom-spec.coffee index c87e7a34a..2bb8af19f 100644 --- a/spec/app/atom-spec.coffee +++ b/spec/app/atom-spec.coffee @@ -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"