aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/cd_spec.lua
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2016-05-06 19:55:14 -0400
committerJohn Szakmeister <john@szakmeister.net>2016-05-06 19:55:14 -0400
commite91afdcda69b408b6f2572e82de3eb0ad4eee0b5 (patch)
treec2109f8d491c2961e834957391bbfb3616f14761 /test/functional/ex_cmds/cd_spec.lua
parent508ee7f245fc164f6a3792e69bd744a2f819a362 (diff)
downloadrneovim-e91afdcda69b408b6f2572e82de3eb0ad4eee0b5.tar.gz
rneovim-e91afdcda69b408b6f2572e82de3eb0ad4eee0b5.tar.bz2
rneovim-e91afdcda69b408b6f2572e82de3eb0ad4eee0b5.zip
test/functional: fix a dependency on the previous test suite
While trying to debug an issue, I discovered that the tests for illegal arguments depended on the prior suite having run and started a session. Let's remove that unintentional dependency by starting our own session before each test.
Diffstat (limited to 'test/functional/ex_cmds/cd_spec.lua')
-rw-r--r--test/functional/ex_cmds/cd_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/ex_cmds/cd_spec.lua b/test/functional/ex_cmds/cd_spec.lua
index 2c62218d1b..69467632a4 100644
--- a/test/functional/ex_cmds/cd_spec.lua
+++ b/test/functional/ex_cmds/cd_spec.lua
@@ -111,6 +111,10 @@ end
-- Test legal parameters for 'getcwd' and 'haslocaldir'
for _, cmd in ipairs {'getcwd', 'haslocaldir'} do
describe(cmd..'()', function()
+ before_each(function()
+ clear()
+ end)
+
-- Test invalid argument types
local err474 = 'Vim(call):E474: Invalid argument'
it('fails on string', function()