From bec65cf2acc1591fb8ecb520660697a3a06b07e4 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Thu, 24 Apr 2014 13:47:01 -0700 Subject: [PATCH] Only fail on deprecations when core specs are run --- spec/spec-helper.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index 14f4fadad..80af7fcac 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -38,6 +38,7 @@ jasmine.getEnv().defaultTimeoutInterval = 5000 specPackageName = null specPackagePath = null specProjectPath = null +isCoreSpec = false {specDirectory, resourcePath} = atom.getLoadSettings() @@ -47,8 +48,10 @@ if specDirectory specPackageName = JSON.parse(fs.readFileSync(path.join(specPackagePath, 'package.json')))?.name specProjectPath = path.join(specDirectory, 'fixtures') +isCoreSpec = specDirectory == fs.realpathSync(__dirname) + beforeEach -> - Grim.clearDeprecations() + Grim.clearDeprecations() if isCoreSpec $.fx.off = true projectPath = specProjectPath ? path.join(@specDirectory, 'fixtures') atom.project = new Project(path: projectPath) @@ -126,7 +129,7 @@ afterEach -> jasmine.unspy(atom, 'saveSync') ensureNoPathSubscriptions() atom.syntax.off() - ensureNoDeprecatedFunctionsCalled() + ensureNoDeprecatedFunctionsCalled() if isCoreSpec waits(0) # yield to ui thread to make screen update more frequently ensureNoPathSubscriptions = ->