From 520ffd69fd2debe98da285c7fe3fd80159b9b3fa Mon Sep 17 00:00:00 2001 From: mishina Date: Mon, 25 Sep 2023 21:00:13 +0900 Subject: [PATCH] style: Suppress `Minitest/AssertOperator` cop --- test/test_god_system.rb | 2 +- test/test_logger.rb | 4 ++-- test/test_system_process.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_god_system.rb b/test/test_god_system.rb index f874d821..9aded6e0 100644 --- a/test/test_god_system.rb +++ b/test/test_god_system.rb @@ -110,7 +110,7 @@ def test_stop_all_with_non_killing_signal_long_timeout # use short timeout to send SIGKILL before 10s timeout def test_stop_all_with_non_killing_signal_short_timeout stop_timeout = 1 - assert stop_timeout < ::God::STOP_TIMEOUT_DEFAULT + assert_operator stop_timeout, :<, ::God::STOP_TIMEOUT_DEFAULT with_god_cleanup do God.start God.watch do |w| diff --git a/test/test_logger.rb b/test/test_logger.rb index 118d7f13..8f727d15 100644 --- a/test/test_logger.rb +++ b/test/test_logger.rb @@ -43,8 +43,8 @@ def test_watch_log_since out = @log.watch_log_since('foo', t2) - assert(/one/ !~ out) - assert(/two/ !~ out) + refute_match(/one/, out) + refute_match(/two/, out) assert_match(/three/, out) end diff --git a/test/test_system_process.rb b/test/test_system_process.rb index 4f275b1f..2160ded0 100644 --- a/test/test_system_process.rb +++ b/test/test_system_process.rb @@ -18,7 +18,7 @@ def test_exists_should_return_false_for_non_existent_process def test_memory assert_kind_of Integer, @process.memory - assert @process.memory > 0 + assert_operator @process.memory, :>, 0 end def test_percent_memory