chinese_faker 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24319b31588936d3b2427b694d367e35c9f8ea0a
4
- data.tar.gz: 277c5f17e6ecb2c75adb3f511590105df544e833
3
+ metadata.gz: 0dbf66de81331ff357de1fb0a7326d1440149033
4
+ data.tar.gz: 19b2ae5498633857ac11c726ab0d2eb8fce1a677
5
5
  SHA512:
6
- metadata.gz: 7ac8dbd61917a52f57565921a76d25d590f05ee97fa42e50e3d49754397033af8d40ea431a0e595d8e2e149a6d995077290cf53b5a83dc417154ce3326f375a9
7
- data.tar.gz: 4fb1d4dedbf41764358c4a4b725dfb82888972e8f278edbb5b19fbef31b7bb2b2389ffcd3c829999f38dbf97dc8278a73f8721ff0bd74dcc4efcd649407b5060
6
+ metadata.gz: c3ebc710356162eaea13c5f4a7b60e9db3dd0a93e3ce1b41d32e1cce1144936adcc38333ee334a91164d9004876a627956fccff15034af76f9dbe3c3f812934c
7
+ data.tar.gz: 8c92ea23f1f08ba8ee7684346dcab33f2f1489af191056f2ef4bb13f18b040f42e0869ebf4c318fe20ba984a676be46ec9cc35c08249aae49abf0d4c075087d6
data/README.md CHANGED
@@ -25,10 +25,11 @@ Or install it yourself as:
25
25
 
26
26
  ``` ruby
27
27
  ChineseFaker::Name.name #=> "劉志偉"
28
-
29
28
  ChineseFaker::Name.name(with_title: true) #=> "李敏醫師"
30
-
31
29
  ChineseFaker::Job.title #=> "軟體工程師"
30
+ ChineseFaker::Address.district #=> 桃園市
31
+ ChineseFaker::Address.city #=> 新竹市
32
+ ChineseFaker::Address.county #=> 苗栗縣
32
33
  ```
33
34
 
34
35
  ## Contributing
@@ -1,3 +1,3 @@
1
1
  module ChineseFaker
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -0,0 +1,24 @@
1
+ # encoding: utf-8
2
+ require 'test_helper'
3
+
4
+ class TestChineseFakerAddress < Test::Unit::TestCase
5
+ def setup
6
+ @tester = ChineseFaker::Address
7
+ @translations = YAML.load_file(File.expand_path('lib/locales/zh-tw.yml'))
8
+ end
9
+
10
+ def test_address_district
11
+ districts = @translations['zh-tw']['chinese_faker']['address']['district'][0].split
12
+ assert districts.include?(@tester.district)
13
+ end
14
+
15
+ def test_address_city
16
+ cities = @translations['zh-tw']['chinese_faker']['address']['city'][0].split
17
+ assert cities.include?(@tester.city)
18
+ end
19
+
20
+ def test_address_county
21
+ counties = @translations['zh-tw']['chinese_faker']['address']['county'][0].split
22
+ assert counties.include?(@tester.county)
23
+ end
24
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chinese_faker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernie Chiu
@@ -45,6 +45,7 @@ files:
45
45
  - lib/chinese_faker/name.rb
46
46
  - lib/chinese_faker/version.rb
47
47
  - lib/locales/zh-tw.yml
48
+ - test/test_chinese_faker_address.rb
48
49
  - test/test_chinese_faker_job.rb
49
50
  - test/test_chinese_faker_name.rb
50
51
  - test/test_helper.rb
@@ -73,6 +74,7 @@ signing_key:
73
74
  specification_version: 4
74
75
  summary: Call the gem module by each proper method to generate
75
76
  test_files:
77
+ - test/test_chinese_faker_address.rb
76
78
  - test/test_chinese_faker_job.rb
77
79
  - test/test_chinese_faker_name.rb
78
80
  - test/test_helper.rb