ffaker 1.15.0 → 1.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/Changelog.rdoc +4 -1
  2. data/Gemfile +2 -0
  3. data/README.rdoc +1 -1
  4. data/ffaker.gemspec +43 -2
  5. data/lib/ffaker.rb +31 -5
  6. data/lib/ffaker/address.rb +57 -4
  7. data/lib/ffaker/address_au.rb +41 -42
  8. data/lib/ffaker/address_de.rb +16 -0
  9. data/lib/ffaker/address_mx.rb +448 -0
  10. data/lib/ffaker/address_se.rb +1074 -0
  11. data/lib/ffaker/company_se.rb +24 -0
  12. data/lib/ffaker/conference.rb +52 -0
  13. data/lib/ffaker/dizzle_ipsum.rb +30 -0
  14. data/lib/ffaker/identification.rb +25 -0
  15. data/lib/ffaker/internet_se.rb +105 -0
  16. data/lib/ffaker/lorem.rb +1 -1
  17. data/lib/ffaker/lorem_ar.rb +45 -0
  18. data/lib/ffaker/lorem_cn.rb +6 -6
  19. data/lib/ffaker/movie.rb +64 -0
  20. data/lib/ffaker/name_ga.rb +57 -0
  21. data/lib/ffaker/name_mx.rb +198 -0
  22. data/lib/ffaker/name_ph.rb +91 -0
  23. data/lib/ffaker/name_se.rb +97 -0
  24. data/lib/ffaker/name_sn.rb +1 -1
  25. data/lib/ffaker/phone_number_mx.rb +57 -0
  26. data/lib/ffaker/phone_number_se.rb +111 -0
  27. data/lib/ffaker/ssn.rb +15 -0
  28. data/lib/ffaker/ssn_se.rb +111 -0
  29. data/lib/ffaker/string.rb +90 -0
  30. data/lib/ffaker/time.rb +28 -0
  31. data/lib/ffaker/venue.rb +45 -0
  32. data/test/test_address.rb +15 -7
  33. data/test/test_address_au.rb +10 -14
  34. data/test/test_address_de.rb +8 -0
  35. data/test/test_address_mx.rb +25 -0
  36. data/test/test_address_se.rb +36 -0
  37. data/test/test_company_se.rb +14 -0
  38. data/test/test_conference.rb +8 -0
  39. data/test/test_dizzle_ipsum.rb +28 -0
  40. data/test/test_faker.rb +20 -4
  41. data/test/test_faker_internet_se.rb +66 -0
  42. data/test/test_faker_name_ga.rb +54 -0
  43. data/test/test_faker_name_mx.rb +177 -0
  44. data/test/test_faker_name_ph.rb +15 -0
  45. data/test/test_faker_name_se.rb +37 -0
  46. data/test/test_faker_name_sn.rb +1 -0
  47. data/test/test_identification.rb +25 -0
  48. data/test/test_lorem_ar.rb +35 -0
  49. data/test/test_movie.rb +7 -0
  50. data/test/test_phone_number_mx.rb +42 -0
  51. data/test/test_phone_number_se.rb +58 -0
  52. data/test/test_ssn.rb +9 -0
  53. data/test/test_ssn_se.rb +43 -0
  54. data/test/test_string.rb +69 -0
  55. data/test/test_time.rb +17 -0
  56. data/test/test_venue.rb +8 -0
  57. metadata +64 -4
@@ -6,8 +6,8 @@ class TestAddressAU < Test::Unit::TestCase
6
6
 
7
7
  def test_au_state_abbr
8
8
  arr = Faker::AddressAU::STATE_ABBR.sort
9
- assert arr = Faker::AddressAU::CITY.keys.sort
10
- assert arr = Faker::AddressAU::ZIP_CODE.keys.sort
9
+ assert arr = Faker::AddressAU::SUBURB.keys.sort
10
+ assert arr = Faker::AddressAU::POSTCODE.keys.sort
11
11
  end
12
12
 
13
13
  def test_au_state
@@ -18,14 +18,10 @@ class TestAddressAU < Test::Unit::TestCase
18
18
  assert_match /[A-Z]/, Faker::AddressAU.state_abbr
19
19
  end
20
20
 
21
- def test_au_city
22
- assert_match /[a-zA-Z]/, Faker::AddressAU.city
21
+ def test_au_suburb
22
+ assert_match /[a-zA-Z]/, Faker::AddressAU.suburb
23
23
  end
24
24
 
25
- def test_zip_code
26
- assert_match /\d{4}/, Faker::AddressAU.zip_code
27
- end
28
-
29
25
  def test_postcode
30
26
  assert_match /\d{4}/, Faker::AddressAU.postcode
31
27
  end
@@ -34,19 +30,19 @@ class TestAddressAU < Test::Unit::TestCase
34
30
  assert_match /[\, a-z]/, Faker::AddressAU.full_address
35
31
  end
36
32
 
37
- def test_zip_code_frozen
38
- assert Faker::AddressAU.zip_code.frozen? == false
33
+ def test_postcode_frozen
34
+ assert Faker::AddressAU.postcode.frozen? == false
39
35
  end
40
36
 
41
- def test_au_city_with_states
37
+ def test_au_suburb_with_states
42
38
  Faker::AddressAU::STATE_ABBR.each do |st_abbr|
43
- assert_match /[a-zA-Z]/, Faker::AddressAU.city(st_abbr)
39
+ assert_match /[a-zA-Z]/, Faker::AddressAU.suburb(st_abbr)
44
40
  end
45
41
  end
46
42
 
47
- def test_zip_code_with_states
43
+ def test_postcode_with_states
48
44
  Faker::AddressAU::STATE_ABBR.each do |st_abbr|
49
- assert_match /\d{4}/, Faker::AddressAU.zip_code(st_abbr)
45
+ assert_match /\d{4}/, Faker::AddressAU.postcode(st_abbr)
50
46
  end
51
47
  end
52
48
 
@@ -12,4 +12,12 @@ class TestAddressDE < Test::Unit::TestCase
12
12
  def test_zip_code
13
13
  assert_match /^\d{5}$/, Faker::AddressDE.zip_code
14
14
  end
15
+
16
+ def test_street_name
17
+ assert_match /[ a-z]+/, Faker::AddressDE.street_name
18
+ end
19
+
20
+ def test_street_address
21
+ assert_match /[ a-z]+/, Faker::AddressDE.street_address
22
+ end
15
23
  end
@@ -0,0 +1,25 @@
1
+ # encoding: utf-8
2
+ # => author: guapolo github.com/guapolo
3
+ require 'helper'
4
+
5
+ class TestAddressMX < Test::Unit::TestCase
6
+ def setup
7
+ @tester = Faker::AddressMX
8
+ end
9
+
10
+ def test_mx_state
11
+ assert_match /[ A-Za-z]/, @tester.state
12
+ end
13
+
14
+ def test_mx_state_abbr
15
+ assert_match /[A-Z]/, @tester.state_abbr
16
+ end
17
+
18
+ def test_postcode
19
+ assert_match /[0-9]/, @tester.zip_code
20
+ end
21
+
22
+ def test_mx_municipality
23
+ assert_match /[ a-z]/, @tester.municipality
24
+ end
25
+ end
@@ -0,0 +1,36 @@
1
+ # encoding: utf-8
2
+ require 'helper'
3
+
4
+ class TestAddressSE < Test::Unit::TestCase
5
+
6
+ ALPHA = /\A[[:alpha:]]+/
7
+ DIGIT = /\d{1}/
8
+
9
+ def test_se_city
10
+ assert_match ALPHA, Faker::AddressSE.city
11
+ end
12
+
13
+ def test_se_zip_code
14
+ assert_match(/\d{2}/, Faker::AddressSE.zip_code)
15
+ end
16
+
17
+ def test_countries
18
+ assert Faker::AddressSE::COUNTRIES.include?(Faker::AddressSE.random_country)
19
+ end
20
+
21
+ def test_se_full_address
22
+ address = Faker::AddressSE.full_address
23
+ assert_match ALPHA, address
24
+ assert_match DIGIT, address
25
+ assert_match(/SVERIGE/, address)
26
+ end
27
+
28
+ def test_se_zip_code_frozen
29
+ assert Faker::AddressSE.zip_code.frozen? == false
30
+ end
31
+
32
+ def test_se_full_address
33
+ assert_match(/[\, a-z]/, Faker::AddressSE.full_address)
34
+ end
35
+
36
+ end
@@ -0,0 +1,14 @@
1
+ # encoding: utf-8
2
+ require 'helper'
3
+
4
+ class TestCompanySE < Test::Unit::TestCase
5
+
6
+ def test_name
7
+ assert_match(/[ a-z]+/, Faker::CompanySE.name)
8
+ end
9
+
10
+ def test_suffix
11
+ assert_match(/[ a-z]+/i, Faker::CompanySE.suffix)
12
+ end
13
+
14
+ end
@@ -0,0 +1,8 @@
1
+ require 'helper'
2
+
3
+ class TestConference < Test::Unit::TestCase
4
+ def test_name
5
+ assert_match /1\+|[ a-z]+/i, Faker::Conference.name
6
+ end
7
+ end
8
+
@@ -0,0 +1,28 @@
1
+ require 'helper'
2
+
3
+ class TestDizzleIpsum < Test::Unit::TestCase
4
+
5
+ def test_paragraph
6
+ assert_match /1\+|[ a-z]+/i, Faker::DizzleIpsum.paragraph
7
+ end
8
+
9
+ def test_sentence
10
+ assert_match /1\+|[ a-z]+/i, Faker::DizzleIpsum.sentence
11
+ end
12
+
13
+ def test_paragraphs
14
+ assert_match /1\+|[ a-z]+/i, Faker::DizzleIpsum.paragraphs.join(" ")
15
+ end
16
+
17
+ def test_sentences
18
+ assert_match /1\+|[ a-z]+/i, Faker::DizzleIpsum.sentences.join(" ")
19
+ end
20
+
21
+ def test_words
22
+ assert_match /1\+|[ a-z]+/i, Faker::DizzleIpsum.words.join(" ")
23
+ end
24
+
25
+ def test_word
26
+ assert_match /1\+|[a-z]+/i, Faker::DizzleIpsum.word
27
+ end
28
+ end
data/test/test_faker.rb CHANGED
@@ -10,18 +10,34 @@ class TestFaker < Test::Unit::TestCase
10
10
  end
11
11
 
12
12
  def test_letterify
13
- assert Faker.letterify('???').match(/[a-z]{3}/)
13
+ assert Faker.letterify(false, '???').match(/[a-z]{3}/)
14
+ end
15
+
16
+ def test_capital_letterify
17
+ assert Faker.letterify(true, '???').match(/[A-Z]{3}/)
14
18
  end
15
19
 
16
20
  def test_letterify_with_array
17
- assert Faker.letterify(['???', '???']).match(/[a-z]{3}/)
21
+ assert Faker.letterify(false, ['???', '???']).match(/[a-z]{3}/)
18
22
  end
19
23
 
24
+ def test_capital_letterify_with_array
25
+ assert Faker.letterify(true, ['???', '???']).match(/[A-Z]{3}/)
26
+ end
27
+
20
28
  def test_bothify
21
29
  assert Faker.bothify('???###').match(/[a-z]{3}\d{3}/)
22
30
  end
23
31
 
24
- def test_bothify
25
- assert Faker.bothify(['???###', '???###']).match(/[a-z]{3}\d{3}/)
32
+ def test_capital_bothify
33
+ assert Faker.bothify(true, '???###').match(/[A-Z]{3}\d{3}/)
34
+ end
35
+
36
+ def test_bothify_with_array
37
+ assert Faker.bothify(false, ['???###', '???###']).match(/[a-z]{3}\d{3}/)
38
+ end
39
+
40
+ def test_capital_bothify_with_array
41
+ assert Faker.bothify(true, ['???###', '???###']).match(/[A-Z]{3}\d{3}/)
26
42
  end
27
43
  end
@@ -0,0 +1,66 @@
1
+ # encoding: utf-8
2
+ require 'helper'
3
+
4
+ class TestFakerInternetSE < Test::Unit::TestCase
5
+
6
+ def setup
7
+ @tester = Faker::InternetSE
8
+ end
9
+
10
+ def test_email
11
+ assert @tester.email.match(/.+@.+\.\w+/)
12
+ end
13
+
14
+ def test_email_frozen
15
+ assert @tester.email.frozen? == false
16
+ end
17
+
18
+ def test_disposable_email
19
+ assert @tester.disposable_email.match(/.+@(mailinator\.com|suremail\.info|spamherelots\.com|binkmail\.com|safetymail\.info)/)
20
+ end
21
+
22
+ def test_free_email
23
+ email = @tester.free_email
24
+ assert email.match(/.+@(gmail\.com|hotmail\.com|yahoo\.com|spray\.se|passagen\.se)/), "mail: #{email} does not match"
25
+ end
26
+
27
+ def test_login_user_name
28
+ assert @tester.login_user_name.match(/[a-z]+((_|)[a-z]+)?/)
29
+ end
30
+
31
+ def test_user_name
32
+ assert @tester.user_name.match(/[a-z]+((_|\.)[a-z]+)?/)
33
+ end
34
+
35
+ def test_user_name_with_arg
36
+ assert @tester.user_name('joel larsson').match(/(joel(_|\.)larsson|larsson(_|\.)joel)/)
37
+ end
38
+
39
+ def test_domain_name
40
+ assert @tester.domain_name.match(/\w+\.\w+/)
41
+ end
42
+
43
+ def test_domain_word
44
+ assert @tester.domain_word.match(/^\w+$/)
45
+ end
46
+
47
+ def test_domain_suffix
48
+ assert @tester.domain_suffix.match(/^\w+(\.\w+)?/)
49
+ end
50
+
51
+ def test_uri
52
+ assert @tester.uri("ftp").match(/^ftp:\/\/.+/)
53
+ assert @tester.uri("http").match(/^http:\/\/.+/)
54
+ assert @tester.uri("https").match(/^https:\/\/.+/)
55
+ end
56
+
57
+ def test_http_url
58
+ assert @tester.http_url.match(/^http:\/\/.+/)
59
+ end
60
+
61
+ def test_ip_v4_address
62
+ assert @tester.ip_v4_address.match(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/)
63
+ end
64
+
65
+ end
66
+
@@ -0,0 +1,54 @@
1
+ require 'helper'
2
+
3
+ class TestFakerNameGa < Test::Unit::TestCase
4
+
5
+ def setup
6
+ @tester = Faker::NameGA
7
+ end
8
+
9
+ def test_last_name
10
+ assert Faker::NameGA::LAST_NAMES.include?(@tester.last_name)
11
+ end
12
+
13
+ def test_first_name_male
14
+ assert Faker::NameGA::FIRST_NAMES_MALE.include?(@tester.first_name_male)
15
+ end
16
+
17
+ def test_first_name_female
18
+ assert Faker::NameGA::FIRST_NAMES_FEMALE.include?(@tester.first_name_female)
19
+ end
20
+
21
+ def test_name_male
22
+ # => split the name_male into an array of words
23
+ parts = @tester.name_male.split(' ')
24
+
25
+ # the value at the index 0 should be a valid! male_prefix
26
+ assert Faker::NameGA::FIRST_NAMES_MALE.include?(parts[0])
27
+
28
+ # the value at the index 1 should be a valid! last_name
29
+ assert Faker::NameGA::LAST_NAMES.include?(parts[1])
30
+ end
31
+
32
+ def test_name_female
33
+ # => split the name_male into an array of words
34
+ parts = @tester.name_female.split(' ')
35
+
36
+ # the value at the index 0 should be a valid! male_prefix
37
+ assert Faker::NameGA::FIRST_NAMES_FEMALE.include?(parts[0])
38
+
39
+ # the value at the index 1 should be a valid! last_name
40
+ assert Faker::NameGA::LAST_NAMES.include?(parts[1])
41
+ end
42
+
43
+
44
+ def test_name
45
+ # => split the name_male into an array of words
46
+ parts = @tester.name.split(' ')
47
+
48
+ # the value at the index 0 should be a valid! male_prefix
49
+ assert Faker::NameGA::FIRST_NAMES_FEMALE.include?(parts[0]) || Faker::NameGA::FIRST_NAMES_MALE.include?(parts[0])
50
+
51
+ # the value at the index 1 should be a valid! last_name
52
+ assert Faker::NameGA::LAST_NAMES.include?(parts[1])
53
+ end
54
+ end
@@ -0,0 +1,177 @@
1
+ # encoding: utf-8
2
+ # => author: guapolo github.com/guapolo
3
+ require 'helper'
4
+
5
+ class TestFakerNameMX < Test::Unit::TestCase
6
+ def setup
7
+ @tester = Faker::NameMX
8
+ end
9
+
10
+ def test_last_name
11
+ assert Faker::NameMX::LAST_NAMES.include?(@tester.last_name)
12
+ end
13
+
14
+ def test_first_name
15
+ assert Faker::NameMX::FIRST_NAMES.include?(@tester.first_name)
16
+ end
17
+
18
+ def test_middle_name
19
+ assert Faker::NameMX::FIRST_NAMES.include?(@tester.middle_name)
20
+ end
21
+
22
+ def test_name
23
+ assert Faker::NameMX::FIRST_NAMES.include?(@tester.name)
24
+ end
25
+
26
+ def test_prefix_male
27
+ assert Faker::NameMX::MALE_PREFIXES.include?(@tester.male_prefix)
28
+ end
29
+
30
+ def test_prefix_female
31
+ assert Faker::NameMX::FEMALE_PREFIXES.include?(@tester.female_prefix)
32
+ end
33
+
34
+ def test_prefix
35
+ assert Faker::NameMX::PREFIXES.include?(@tester.prefix)
36
+ end
37
+
38
+ def test_male_name
39
+ parts = @tester.male_name.split(' ')
40
+ case parts.count
41
+ when 1 then assert Faker::NameMX::MALE_FIRST_NAMES.include?(parts[0])
42
+ when 2 then assert Faker::NameMX::MALE_FIRST_NAMES.include?(parts[0]) &&
43
+ Faker::NameMX::MALE_FIRST_NAMES.include?(parts[1])
44
+ end
45
+ end
46
+
47
+ def test_female_name
48
+ parts = @tester.female_name.split(' ')
49
+ case parts.count
50
+ when 1 then assert Faker::NameMX::FEMALE_FIRST_NAMES.include?(parts[0])
51
+ when 2 then assert Faker::NameMX::FEMALE_FIRST_NAMES.include?(parts[0]) &&
52
+ Faker::NameMX::FEMALE_FIRST_NAMES.include?(parts[1])
53
+ end
54
+ end
55
+
56
+ def test_full_name_male
57
+ parts = @tester.full_name(:male).split(' ')
58
+ case parts.count
59
+ when 5
60
+ assert Faker::NameMX::MALE_PREFIXES.include?(parts[0])
61
+ assert Faker::NameMX::MALE_FIRST_NAMES.include?(parts[1])
62
+ # Middle name
63
+ assert Faker::NameMX::MALE_FIRST_NAMES.include?(parts[2])
64
+ assert Faker::NameMX::LAST_NAMES.include?(parts[3])
65
+ assert Faker::NameMX::LAST_NAMES.include?(parts[4])
66
+ when 4
67
+ prefix_or_first_name = Faker::NameMX::MALE_PREFIXES.include?(parts[0]) ||
68
+ Faker::NameMX::MALE_FIRST_NAMES.include?(parts[0])
69
+ assert prefix_or_first_name
70
+ assert Faker::NameMX::MALE_FIRST_NAMES.include?(parts[1])
71
+ assert Faker::NameMX::LAST_NAMES.include?(parts[2])
72
+ assert Faker::NameMX::LAST_NAMES.include?(parts[3])
73
+ when 3
74
+ assert Faker::NameMX::MALE_FIRST_NAMES.include?(parts[0])
75
+ assert Faker::NameMX::LAST_NAMES.include?(parts[1])
76
+ assert Faker::NameMX::LAST_NAMES.include?(parts[2])
77
+ else
78
+ flunk "Invalid Male Name"
79
+ end
80
+ end
81
+
82
+ def test_full_name_female
83
+ parts = @tester.full_name(:female).split(' ')
84
+ case parts.count
85
+ when 5
86
+ assert Faker::NameMX::FEMALE_PREFIXES.include?(parts[0])
87
+ assert Faker::NameMX::FEMALE_FIRST_NAMES.include?(parts[1])
88
+ # Middle name
89
+ assert Faker::NameMX::FEMALE_FIRST_NAMES.include?(parts[2])
90
+ assert Faker::NameMX::LAST_NAMES.include?(parts[3])
91
+ assert Faker::NameMX::LAST_NAMES.include?(parts[4])
92
+ when 4
93
+ prefix_or_first_name = Faker::NameMX::FEMALE_PREFIXES.include?(parts[0]) ||
94
+ Faker::NameMX::FEMALE_FIRST_NAMES.include?(parts[0])
95
+ assert prefix_or_first_name
96
+ assert Faker::NameMX::FEMALE_FIRST_NAMES.include?(parts[1])
97
+ assert Faker::NameMX::LAST_NAMES.include?(parts[2])
98
+ assert Faker::NameMX::LAST_NAMES.include?(parts[3])
99
+ when 3
100
+ assert Faker::NameMX::FEMALE_FIRST_NAMES.include?(parts[0])
101
+ assert Faker::NameMX::LAST_NAMES.include?(parts[1])
102
+ assert Faker::NameMX::LAST_NAMES.include?(parts[2])
103
+ else
104
+ flunk "Invalid Female Name"
105
+ end
106
+ end
107
+
108
+ def test_full_name
109
+ parts = @tester.full_name.split(' ')
110
+ case parts.count
111
+ when 5
112
+ assert Faker::NameMX::PREFIXES.include?(parts[0])
113
+ assert Faker::NameMX::FIRST_NAMES.include?(parts[1])
114
+ # Middle name
115
+ assert Faker::NameMX::FIRST_NAMES.include?(parts[2])
116
+ assert Faker::NameMX::LAST_NAMES.include?(parts[3])
117
+ assert Faker::NameMX::LAST_NAMES.include?(parts[4])
118
+ when 4
119
+ prefix_or_first_name = Faker::NameMX::PREFIXES.include?(parts[0]) ||
120
+ Faker::NameMX::FIRST_NAMES.include?(parts[0])
121
+ assert prefix_or_first_name
122
+ assert Faker::NameMX::FIRST_NAMES.include?(parts[1])
123
+ assert Faker::NameMX::LAST_NAMES.include?(parts[2])
124
+ assert Faker::NameMX::LAST_NAMES.include?(parts[3])
125
+ when 3
126
+ assert Faker::NameMX::FIRST_NAMES.include?(parts[0])
127
+ assert Faker::NameMX::LAST_NAMES.include?(parts[1])
128
+ assert Faker::NameMX::LAST_NAMES.include?(parts[2])
129
+ else
130
+ flunk "Invalid Name"
131
+ end
132
+ end
133
+
134
+ def test_full_name_no_prefix
135
+ parts = @tester.full_name_no_prefix.split(' ')
136
+ case parts.count
137
+ when 4
138
+ assert Faker::NameMX::FIRST_NAMES.include?(parts[0])
139
+ assert Faker::NameMX::FIRST_NAMES.include?(parts[1])
140
+ assert Faker::NameMX::LAST_NAMES.include?(parts[2])
141
+ assert Faker::NameMX::LAST_NAMES.include?(parts[3])
142
+ when 3
143
+ assert Faker::NameMX::FIRST_NAMES.include?(parts[0])
144
+ assert Faker::NameMX::LAST_NAMES.include?(parts[1])
145
+ assert Faker::NameMX::LAST_NAMES.include?(parts[2])
146
+ else
147
+ flunk "Invalid Name"
148
+ end
149
+ end
150
+
151
+ def test_full_name_prefix
152
+ parts = @tester.full_name_prefix.split(' ')
153
+ case parts.count
154
+ when 5
155
+ assert Faker::NameMX::PREFIXES.include?(parts[0])
156
+ assert Faker::NameMX::FIRST_NAMES.include?(parts[1])
157
+ # Middle name
158
+ assert Faker::NameMX::FIRST_NAMES.include?(parts[2])
159
+ assert Faker::NameMX::LAST_NAMES.include?(parts[3])
160
+ assert Faker::NameMX::LAST_NAMES.include?(parts[4])
161
+ when 4
162
+ prefix_or_first_name = Faker::NameMX::PREFIXES.include?(parts[0]) ||
163
+ Faker::NameMX::FIRST_NAMES.include?(parts[0])
164
+ assert prefix_or_first_name
165
+ assert Faker::NameMX::FIRST_NAMES.include?(parts[1])
166
+ assert Faker::NameMX::LAST_NAMES.include?(parts[2])
167
+ assert Faker::NameMX::LAST_NAMES.include?(parts[3])
168
+ when 3
169
+ assert Faker::NameMX::FIRST_NAMES.include?(parts[0])
170
+ assert Faker::NameMX::LAST_NAMES.include?(parts[1])
171
+ assert Faker::NameMX::LAST_NAMES.include?(parts[2])
172
+ else
173
+ flunk "Invalid Name"
174
+ end
175
+ end
176
+
177
+ end