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