From ef1c1d0655423021f60d85baa4d4cb36f862b01e Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 18 Jul 2018 00:37:40 +0200 Subject: [PATCH 1/1] 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. --- spec/indent/indent_spec.rb | 2 +- spec/spec_helper.rb | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) 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 -- 2.39.5