Skip to content

Commit

Permalink
Fix time period test that could result in a flake test within 15 days… (
Browse files Browse the repository at this point in the history
faker-ruby#527)

* 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
  • Loading branch information
melonhead901 authored and vbrazo committed Jul 12, 2018
1 parent f563db6 commit 036be7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_faker_time.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 036be7e

Please sign in to comment.