Skip to content

Commit 6595da9

Browse files
author
Stefanni Brasil
authored
Remove tzinfo dependency (#2952)
faker unfortunately can't be relying on gems for validating random generated data for every generator we have. That introduces too much work for maintainers. Having one dependency for tests means opening the doors for more dependencies later on. Although we do our best to keep the library up to date, we can't keep up with all the validations to be passing. If users rely on valid Timezones for their apps, we recommend not relying on faker for that and instead ensure valid data is generated on their end.
1 parent fad7ac4 commit 6595da9

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ gem 'rubocop-rake', '0.6.0'
1515
gem 'simplecov', '0.22.0'
1616
gem 'test-unit', '3.6.2'
1717
gem 'timecop', '0.9.8'
18-
gem 'tzinfo', '2.0.6'
1918
gem 'yard', '0.9.36'

test/test_en_locale.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# frozen_string_literal: true
22

3-
require 'tzinfo'
43
require_relative 'test_helper'
54

65
class TestEnLocale < Test::Unit::TestCase
@@ -40,13 +39,6 @@ def test_values_trimmed
4039
check_hash(en_file)
4140
end
4241

43-
def test_en_timezones_are_valid_iana_identifiers
44-
faker_time_zones = Faker::Address.translate('faker.address.time_zone')
45-
iana_time_zones = TZInfo::Timezone.all_identifiers
46-
47-
assert_empty(faker_time_zones.difference(iana_time_zones), "Found a time zone that isn't a valid IANA time zone identifier")
48-
end
49-
5042
def check_hash(hash)
5143
hash.each { |key, value| check_value(value) unless key == 'separator' }
5244
end

0 commit comments

Comments
 (0)