From 382a7b8a7ff65ef90e589fd380aa7fb9478d9e7b Mon Sep 17 00:00:00 2001 From: Matt Colyer Date: Fri, 13 Sep 2013 16:21:07 -0700 Subject: [PATCH] Update specs to reflect new functionality --- spec/atom-spec.coffee | 2 +- spec/theme-manager-spec.coffee | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/spec/atom-spec.coffee b/spec/atom-spec.coffee index e5f1ecf6c..2139cccfb 100644 --- a/spec/atom-spec.coffee +++ b/spec/atom-spec.coffee @@ -22,7 +22,7 @@ describe "the `atom` global", -> atom.reloadBaseStylesheets() it "loads the correct values from the theme's ui-variables file", -> - config.set('core.themes', [project.resolve('themes/theme-with-ui-variables')]) + config.set('core.themes', ['theme-with-ui-variables']) # an override loaded in the base css expect(rootView.css("background-color")).toBe "rgb(0, 0, 255)" diff --git a/spec/theme-manager-spec.coffee b/spec/theme-manager-spec.coffee index 05033a154..d9d9cd45b 100644 --- a/spec/theme-manager-spec.coffee +++ b/spec/theme-manager-spec.coffee @@ -1,6 +1,7 @@ $ = require 'jquery' ThemeManager = require 'theme-manager' +AtomPackage = require 'atom-package' describe "ThemeManager", -> themeManager = null @@ -33,16 +34,16 @@ describe "ThemeManager", -> expect(reloadHandler).toHaveBeenCalled() config.set('core.themes', ['atom-dark-syntax']) - expect($('style.userTheme').length).toBe 1 - expect($('style.userTheme:eq(0)').attr('id')).toMatch /atom-dark-syntax.less$/ + expect($('style.theme').length).toBe 1 + expect($('style.theme:eq(0)').attr('id')).toMatch /atom-dark-syntax/ config.set('core.themes', ['atom-light-syntax', 'atom-dark-syntax']) - expect($('style.userTheme').length).toBe 2 - expect($('style.userTheme:eq(0)').attr('id')).toMatch /atom-light-syntax.less$/ - expect($('style.userTheme:eq(1)').attr('id')).toMatch /atom-dark-syntax.less$/ + expect($('style.theme').length).toBe 2 + expect($('style.theme:eq(0)').attr('id')).toMatch /atom-light-syntax/ + expect($('style.theme:eq(1)').attr('id')).toMatch /atom-dark-syntax/ config.set('core.themes', []) - expect($('style.userTheme').length).toBe 0 + expect($('style.theme').length).toBe 0 # atom-dark-ui has an directory path, the syntax ones dont. config.set('core.themes', ['atom-light-syntax', 'atom-dark-ui', 'atom-dark-syntax']) @@ -67,4 +68,4 @@ describe "ThemeManager", -> config.set('core.themes', ['atom-dark-syntax']) expect(loadHandler).toHaveBeenCalled() - expect(loadHandler.mostRecentCall.args[0]).toBeInstanceOf Theme + expect(loadHandler.mostRecentCall.args[0]).toBeInstanceOf AtomPackage