mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Load user configuration as part of RootView initialization, before any editors are created
This commit is contained in:
@@ -3,7 +3,6 @@ fs = require 'fs'
|
||||
|
||||
describe "Window", ->
|
||||
beforeEach ->
|
||||
spyOn(window, 'loadUserConfiguration')
|
||||
window.startup()
|
||||
|
||||
afterEach ->
|
||||
|
||||
@@ -4,6 +4,7 @@ _ = require 'underscore'
|
||||
Keymap = require 'keymap'
|
||||
Point = require 'point'
|
||||
Directory = require 'directory'
|
||||
RootView = require 'root-view'
|
||||
require 'window'
|
||||
window.showConsole()
|
||||
|
||||
@@ -17,6 +18,7 @@ beforeEach ->
|
||||
directoriesWithSubscriptions = []
|
||||
|
||||
afterEach ->
|
||||
delete window.rootView if window.rootView
|
||||
$('#jasmine-content').empty()
|
||||
document.title = defaultTitle
|
||||
ensureNoDirectorySubscriptions()
|
||||
@@ -24,6 +26,9 @@ afterEach ->
|
||||
window.keymap.bindKeys '*', 'meta-w': 'close'
|
||||
$(document).on 'close', -> window.close()
|
||||
|
||||
# Don't load user configuration in specs, because it's variable
|
||||
RootView.prototype.loadUserConfiguration = ->
|
||||
|
||||
Directory.prototype.originalOn = Directory.prototype.on
|
||||
Directory.prototype.on = (args...) ->
|
||||
directoriesWithSubscriptions.push(this) if @subscriptionCount() == 0
|
||||
|
||||
Reference in New Issue
Block a user