From c43c6547e01bc1738e098519807408c2a0d95703 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Thu, 7 Nov 2024 13:02:40 -0600 Subject: [PATCH] Use should < to get better error messages --- core/kernel/sleep_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/kernel/sleep_spec.rb b/core/kernel/sleep_spec.rb index 9081c5448..f22d577c7 100644 --- a/core/kernel/sleep_spec.rb +++ b/core/kernel/sleep_spec.rb @@ -59,9 +59,8 @@ def o.divmod(*); [0, 0.001]; end end_time = Process.clock_gettime(Process::CLOCK_MONOTONIC) actual_duration = end_time - start_time - puts "start: #{start_time}, end: #{end_time}, actual: #{actual_duration}" - (actual_duration > 0.01).should == true # 100 * 0.0001 => 0.01 - (actual_duration < 0.03).should == true + actual_duration.should > 0.01 # 100 * 0.0001 => 0.01 + actual_duration.should < 0.03 end ruby_version_is ""..."3.3" do