From ad2c1c9c737213d585fff0b51c927d178b2c05a5 Mon Sep 17 00:00:00 2001 From: John Mettraux Date: Thu, 15 Aug 2024 20:52:52 +0900 Subject: [PATCH] Lower time expectations for labby rubies, gh-104 --- CREDITS.md | 1 + spec/parse_spec.rb | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CREDITS.md b/CREDITS.md index 5b95e5f..d674433 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -1,6 +1,7 @@ # fugit credits +* https://github.com/personnumber3377, gh-104 Fugit.parse choke on long input * Michael Scrivo, https://github.com/mscrivo, gh-103 * Benjamin Darcet, https://github.com/bdarcet gh-95 gh-96 et-orbi #rweek * https://github.com/franckduche gh-95 gh-96 et-orbi #rweek diff --git a/spec/parse_spec.rb b/spec/parse_spec.rb index f1590f5..ea3b7d7 100644 --- a/spec/parse_spec.rb +++ b/spec/parse_spec.rb @@ -117,8 +117,8 @@ o, d = do_time { Fugit.parse('0 0' + ' 0' * 10_000 + ' 1 jan * UTC') } - expect(o).to be(nil) - expect(d).to be < 0.042 + expect(d).to be < 0.1 + expect(o).to be nil end end @@ -154,12 +154,12 @@ err end } + expect(d).to be < 0.1 + expect(r.class).to be( ArgumentError) expect(r.message).to eq( 'invalid cron string "0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... len 20015"') - - expect(d).to be < 0.042 end end