From d80e44deec77678fe2d72f94c17b2409b3e794d5 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Thu, 27 Jun 2019 21:02:36 +0200 Subject: Update to ruby/spec@8d74d49 --- spec/ruby/core/time/shared/now.rb | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'spec/ruby/core/time') diff --git a/spec/ruby/core/time/shared/now.rb b/spec/ruby/core/time/shared/now.rb index 80f66a1134..d8e5ac9d50 100644 --- a/spec/ruby/core/time/shared/now.rb +++ b/spec/ruby/core/time/shared/now.rb @@ -18,16 +18,18 @@ describe :time_now, shared: true do end end - it "has at least microsecond precision" do - times = [] - 10_000.times do - times << Time.now.nsec - end + guard_not -> { platform_is :windows and ruby_version_is ""..."2.5" } do + it "has at least microsecond precision" do + times = [] + 10_000.times do + times << Time.now.nsec + end - # The clock should not be less accurate than expected (times should - # not all be a multiple of the next precision up, assuming precisions - # are multiples of ten.) - expected = 1_000 - times.select { |t| t % (expected * 10) == 0 }.size.should_not == times.size + # The clock should not be less accurate than expected (times should + # not all be a multiple of the next precision up, assuming precisions + # are multiples of ten.) + expected = 1_000 + times.select { |t| t % (expected * 10) == 0 }.size.should_not == times.size + end end end -- cgit v1.2.3