From cd4fb6f359081971dfdc1e672f7638986ac809ca Mon Sep 17 00:00:00 2001 From: Brendon Roberto Date: Thu, 16 Jun 2016 14:58:06 -0400 Subject: [PATCH] Add tests for tabnew command with arguments --- spec/ex-commands-spec.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/ex-commands-spec.coffee b/spec/ex-commands-spec.coffee index cb5fc33..08237e3 100644 --- a/spec/ex-commands-spec.coffee +++ b/spec/ex-commands-spec.coffee @@ -496,6 +496,14 @@ describe "the commands", -> submitNormalModeInputText('tabnew') expect(atom.workspace.open).toHaveBeenCalled() + it "opens a new tab for editing when provided an argument", -> + spyOn(Ex, 'tabnew').andCallThrough() + spyOn(Ex, 'tabedit') + keydown(':') + submitNormalModeInputText('tabnew tabnew-test') + expect(Ex.tabedit) + .toHaveBeenCalledWith(Ex.tabnew.calls[0].args...) + describe ":split", -> it "splits the current file upwards/downward", -> pane = atom.workspace.getActivePane()