Skip to content

Commit 0f4e2da

Browse files
author
Josh Bodah
committed
speed up fold tests
1 parent 168815d commit 0f4e2da

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spec/spec_helper.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ def syntax(content, pattern)
6464

6565
def fold_and_replace(content, fold_on_line)
6666
with_file content do
67-
@vim.command("set foldmethod=syntax")
68-
69-
@vim.normal("zO")
70-
@vim.normal("#{fold_on_line}G")
71-
@vim.normal("zc")
72-
@vim.normal("cc#{FOLD_PLACEHOLDER}")
73-
@vim.normal(":.s/\s*//<CR>")
67+
cmd = ":set foldmethod=syntax<CR>"
68+
cmd += "zO"
69+
cmd += "#{fold_on_line}G"
70+
cmd += "zc"
71+
cmd += "cc#{FOLD_PLACEHOLDER}<Esc>"
72+
cmd += ":.s/\s*//<CR>"
73+
@vim.normal(cmd)
7474
end
7575
end
7676

0 commit comments

Comments
 (0)