From 367177d91199a5dc168ecaed15c596207522c9fd Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 19 May 2026 18:54:15 +0900 Subject: [PATCH] Fix RuboCop errors --- test/test_core.rb | 10 +++++----- test/test_preview.rb | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test_core.rb b/test/test_core.rb index 16f6ade4..d4acf103 100644 --- a/test/test_core.rb +++ b/test/test_core.rb @@ -1407,13 +1407,13 @@ class TestCore < TestInteractive --bind 'every(0.1):execute-silent(printf . >> #{fast})' \\ --bind 'every(0.5):execute-silent(printf . >> #{slow})'), :Enter tmux.until { |lines| assert_equal 100, lines.match_count } - sleep 1.2 + sleep(1.2) a = File.exist?(fast) ? File.size(fast) : 0 b = File.exist?(slow) ? File.size(slow) : 0 # Sanity: faster timer fired more times. - assert a > b, "fast timer should fire more (#{a} vs #{b})" + assert_operator a, :>, b, "fast timer should fire more (#{a} vs #{b})" # Sanity: slow timer fired at least once. - assert b >= 1, "slow timer should have fired at least once (#{b})" + assert_operator b, :>=, 1, "slow timer should have fired at least once (#{b})" ensure FileUtils.rm_f(fast) FileUtils.rm_f(slow) @@ -1426,7 +1426,7 @@ class TestCore < TestInteractive tmux.until { |lines| assert_match(/^ \d{2}\.\d+/, lines[-3]) } tmux.send_keys :Space tmux.until { |lines| assert_includes lines[-3], 'STOPPED' } - sleep 0.4 + sleep(0.4) # Header must stay STOPPED after the unbind assert_includes tmux.capture[-3], 'STOPPED' end @@ -1462,7 +1462,7 @@ class TestCore < TestInteractive tmux.send_keys 'x' tmux.until { |lines| assert_includes lines[-1], '[x]>' } # every() ticks shouldn't overwrite FZF_KEY - sleep 1 + sleep(1) assert_includes tmux.capture[-1], '[x]>' end diff --git a/test/test_preview.rb b/test/test_preview.rb index c35cdbe5..6b905eb6 100644 --- a/test/test_preview.rb +++ b/test/test_preview.rb @@ -389,7 +389,7 @@ class TestPreview < TestInteractive "--preview-window 'right,nowrap,border-rounded' " \ '--bind ctrl-w:toggle-preview-wrap ' \ '--bind ctrl-r:change-preview-window:border-bold', :Enter - sleep 2 + sleep(2) # Initial: nowrap, rounded border. The long line is truncated; "wrapped" is hidden. tmux.until do |lines| assert_includes lines[2], '2nd line'