tests work again

This commit is contained in:
Ben Ogle
2013-07-22 16:37:09 -07:00
parent cf3de0e8dc
commit 617f0ae79a
3 changed files with 9 additions and 3 deletions

View File

@@ -0,0 +1,2 @@
'.editor':
'alt-meta-q': 'autoflow:reflow-paragraph'

View File

@@ -1,7 +1,9 @@
module.exports =
activate: ->
rootView.command 'autoflow:reflow-paragraph', '.editor', (e) =>
@reflowParagraph(e.currentTargetView())
rootView.eachEditor (editor) =>
return unless editor.attached and editor.getPane()?
editor.command 'autoflow:reflow-paragraph', (e) =>
@reflowParagraph(e.currentTargetView())
reflowParagraph: (editor) ->
if range = editor.getCurrentParagraphBufferRange()

View File

@@ -1,13 +1,15 @@
RootView = require 'root-view'
describe "Autoflow package", ->
fdescribe "Autoflow package", ->
editor = null
beforeEach ->
window.rootView = new RootView
rootView.open()
atom.activatePackage('autoflow')
rootView.attachToDom()
editor = rootView.getActiveView()
config.set('editor.preferredLineLength', 30)
describe "autoflow:reflow-paragraph", ->