Sha256: 62a1341d1f310dcdd22a52bde048f6cf10be5aaa6634d84acba202dcef15e35e
Contents?: true
Size: 878 Bytes
Versions: 4
Compression:
Stored size: 878 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb') class TestEnNzLocale < Test::Unit::TestCase def setup Faker::Config.locale = 'en-NZ' end def teardown Faker::Config.locale = nil end def test_nz_methods_with_en_nz_locale assert Faker::Name.first_name.is_a? String assert Faker::Name.last_name.is_a? String assert Faker::Address.street_name.is_a? String assert Faker::Address.city.is_a? String end def test_nz_cellphones_start_with_02 cellphone = Faker::PhoneNumber.cell_phone.gsub(/\D/,'') assert_equal '0', cellphone[0] assert_equal '2', cellphone[1] end def test_nz_is_default_country assert_equal 'New Zealand', Faker::Address.default_country end def test_regions_with_en_nz_locale assert Faker::Address.region.is_a? String assert Faker::Address.region_abbr.is_a? String end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
faker-1.6.3 | test/test_en_nz_locale.rb |
faker-1.6.2 | test/test_en_nz_locale.rb |
faker-1.6.1 | test/test_en_nz_locale.rb |
faker-1.6.0 | test/test_en_nz_locale.rb |