Set up spec Project as telepath model

This commit is contained in:
Kevin Sawicki
2013-11-12 17:34:13 -08:00
parent 913bb82d6e
commit 6290c19264
2 changed files with 4 additions and 6 deletions

View File

@@ -47,10 +47,8 @@ if specDirectory = atom.getLoadSettings().specDirectory
beforeEach ->
$.fx.off = true
if specProjectPath
atom.project = new Project(specProjectPath)
else
atom.project = new Project(path.join(@specDirectory, 'fixtures'))
projectPath = specProjectPath ? path.join(@specDirectory, 'fixtures')
atom.project = atom.getWindowState().set('project', new Project(path: projectPath))
window.project = atom.project
window.resetTimeouts()

View File

@@ -209,9 +209,9 @@ class Project extends Model
# Private: DEPRECATED
buildBufferSync: (absoluteFilePath) ->
buffer = new TextBuffer({project: this, filePath: absoluteFilePath})
buffer.loadSync()
buffer = new TextBuffer({filePath: absoluteFilePath})
@addBuffer(buffer)
buffer.loadSync()
buffer
# Private: Given a file path, this sets its {TextBuffer}.