From: Daniel Hahler Date: Tue, 17 Jul 2018 22:37:40 +0000 (+0200) Subject: tests: remove nil from hang-closing tests (#105) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/ef1c1d0655423021f60d85baa4d4cb36f862b01e?ds=sidebyside;hp=7e2f5ac3af42b33d162fb6831d26a23b54338eb2 tests: remove nil from hang-closing tests (#105) There is not much value in running all tests with it to see that the default is used. --- diff --git a/spec/indent/indent_spec.rb b/spec/indent/indent_spec.rb index 79d7f84..871101c 100644 --- a/spec/indent/indent_spec.rb +++ b/spec/indent/indent_spec.rb @@ -515,7 +515,7 @@ shared_examples_for "multiline strings" do end SUITE_SHIFTWIDTHS = [4, 3] -SUITE_HANG_CLOSINGS = [nil, false, true] +SUITE_HANG_CLOSINGS = [false, true] SUITE_SHIFTWIDTHS.each do |sw| describe "vim when using width of #{sw}" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4cd2b56..221e6ed 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -52,12 +52,8 @@ Vimrunner::RSpec.configure do |config| return (i != 0) end def set_hang_closing(value) - if value.nil? - vim.command("unlet! g:python_pep8_indent_hang_closing") - else - i = value ? 1 : 0 - vim.command("let g:python_pep8_indent_hang_closing=#{i}") - end + i = value ? 1 : 0 + vim.command("let g:python_pep8_indent_hang_closing=#{i}") end vim