Project.open returns an editSession instead of a buffer.

First step in removing the coupling of Editor and Buffer. Editor should get all information about the active buffer from the activeEditSession.
This commit is contained in:
Corey Johnson & Nathan Sobo
2012-06-18 15:56:55 -07:00
parent 4bd5a017cf
commit 4659fd7dc3
10 changed files with 78 additions and 93 deletions

View File

@@ -1,5 +1,6 @@
CommandInterpreter = require 'command-interpreter'
Buffer = require 'buffer'
EditSession = require 'edit-session'
Editor = require 'editor'
describe "CommandInterpreter", ->
@@ -7,7 +8,8 @@ describe "CommandInterpreter", ->
beforeEach ->
buffer = new Buffer(require.resolve 'fixtures/sample.js')
editor = new Editor({buffer})
editSession = new EditSession({buffer})
editor = new Editor({editSessions:[editSession]})
interpreter = new CommandInterpreter()
describe "addresses", ->