mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Go ahead and build a RootView in the editor spec
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
RootView = require 'root-view'
|
||||
Buffer = require 'buffer'
|
||||
Editor = require 'editor'
|
||||
Range = require 'range'
|
||||
@@ -12,16 +13,11 @@ describe "Editor", ->
|
||||
editor = null
|
||||
|
||||
beforeEach ->
|
||||
project = new Project(require.resolve('fixtures'))
|
||||
buffer = project.open("sample.js")
|
||||
editor = new Editor { buffer }
|
||||
rootView = new RootView(pathToOpen: require.resolve('fixtures/sample.js'))
|
||||
project = rootView.project
|
||||
editor = rootView.activeEditor()
|
||||
buffer = editor.buffer
|
||||
|
||||
fakeRootView =
|
||||
project: project
|
||||
editorFocused: ->
|
||||
focus: ->
|
||||
|
||||
editor.rootView = -> fakeRootView
|
||||
editor.autoIndent = false
|
||||
editor.enableKeymap()
|
||||
editor.isFocused = true
|
||||
|
||||
Reference in New Issue
Block a user