From 036be7e8f19c40a1d5c0ae8cbba9c690b2f4003c Mon Sep 17 00:00:00 2001 From: Kellen Donohue Date: Wed, 11 Jul 2018 19:04:30 -0700 Subject: [PATCH] =?UTF-8?q?Fix=20time=20period=20test=20that=20could=20res?= =?UTF-8?q?ult=20in=20a=20flake=20test=20within=2015=20days=E2=80=A6=20(#5?= =?UTF-8?q?27)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix time period test that could result in a flake test within 15 days of a DST change. * Make perms match rest of files * Comply with single quotes * Fix time period test that could result in a flake test within 15 days of a DST change. * Make perms match rest of files Comply with single quotes --- test/test_faker_time.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_faker_time.rb b/test/test_faker_time.rb index 5eafdd4583..263f081a64 100644 --- a/test/test_faker_time.rb +++ b/test/test_faker_time.rb @@ -94,8 +94,9 @@ def test_format end def test_time_period - from = Time.at(0).to_date - to = Time.at(2_145_945_600).to_date + # These dates are chosen to avoid any conflict with DST. When period is not strictly respected. + from = Date.parse('2018-09-01') + to = Date.parse('2018-09-15') 100.times do period = @time_ranges.keys.to_a.sample