-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add only japanese word spec #1750
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
def assert_not_english(word) | ||
assert_not_match(/[a-zA-Z]/, word) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,16 +13,24 @@ def teardown | |
|
||
def test_ja_address_methods | ||
assert Faker::Address.postcode.is_a? String | ||
assert_not_english(Faker::Address.postcode) | ||
assert Faker::Address.state.is_a? String | ||
assert_not_english(Faker::Address.state) | ||
assert Faker::Address.state_abbr.is_a? String | ||
assert_not_english(Faker::Address.state_abbr) | ||
assert Faker::Address.city_prefix.is_a? String | ||
assert_not_english(Faker::Address.city_prefix) | ||
assert Faker::Address.city_suffix.is_a? String | ||
assert_not_english(Faker::Address.city_suffix) | ||
assert Faker::Address.city.is_a? String | ||
assert_not_english(Faker::Address.city) | ||
assert Faker::Address.street_name.is_a? String | ||
assert_not_english(Faker::Address.street_name) | ||
end | ||
|
||
def test_ja_ancient_methods | ||
assert Faker::Ancient.god.is_a? String | ||
assert_not_english(Faker::Ancient.god) | ||
end | ||
|
||
def test_ja_cat_methods | ||
|
@@ -35,12 +43,16 @@ def test_ja_color_methods | |
|
||
def test_ja_coffee_methods | ||
assert Faker::Coffee.country.is_a? String | ||
assert_not_english(Faker::Coffee.country) | ||
end | ||
|
||
def test_ja_company_methods | ||
assert Faker::Company.suffix.is_a? String | ||
assert_not_english(Faker::Company.suffix) | ||
assert Faker::Company.category.is_a? String | ||
assert_not_english(Faker::Company.category) | ||
assert Faker::Company.name.is_a? String | ||
assert_not_english(Faker::Company.name) | ||
end | ||
|
||
def test_ja_dog_methods | ||
|
@@ -49,10 +61,12 @@ def test_ja_dog_methods | |
|
||
def test_ja_food_methods | ||
assert Faker::Food.sushi.is_a? String | ||
assert_not_english(Faker::Food.sushi) | ||
end | ||
|
||
def test_ja_gender_methods | ||
assert Faker::Gender.binary_type.is_a? String | ||
assert_not_english(Faker::Gender.binary_type) | ||
end | ||
|
||
def test_ja_lorem_methods | ||
|
@@ -63,43 +77,55 @@ def test_ja_lorem_methods | |
|
||
def test_ja_name_methods | ||
assert Faker::Name.last_name.is_a? String | ||
assert_not_english(Faker::Name.last_name) | ||
assert Faker::Name.first_name.is_a? String | ||
assert_not_english(Faker::Name.first_name) | ||
assert Faker::Name.name.is_a? String | ||
assert_not_english(Faker::Name.name) | ||
assert Faker::Name.name_with_middle.is_a? String | ||
assert Faker::Name.female_first_name.is_a? String | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is not written original Japanese I18n. |
||
assert Faker::Name.male_first_name.is_a? String | ||
assert Faker::Name.suffix.is_a? String | ||
assert Faker::Name.prefix.is_a? String | ||
assert_not_english(Faker::Name.name_with_middle) | ||
end | ||
|
||
def test_ja_phone_number_methods | ||
assert Faker::PhoneNumber.cell_phone.is_a? String | ||
assert_not_english(Faker::PhoneNumber.cell_phone) | ||
assert Faker::PhoneNumber.phone_number.is_a? String | ||
assert_not_english(Faker::PhoneNumber.phone_number) | ||
end | ||
|
||
def test_ja_pokemon_methods | ||
assert Faker::Games::Pokemon.name.is_a? String | ||
assert_not_english(Faker::Games::Pokemon.name) | ||
assert Faker::Games::Pokemon.location.is_a? String | ||
assert_not_english(Faker::Games::Pokemon.location) | ||
assert Faker::Games::Pokemon.move.is_a? String | ||
assert_not_english(Faker::Games::Pokemon.move) | ||
end | ||
|
||
def test_ja_zelda_methods | ||
assert Faker::Games::Zelda.game.is_a? String | ||
assert_not_english(Faker::Games::Zelda.game) | ||
end | ||
|
||
def test_ja_restaurant_methods | ||
assert Faker::Restaurant.name.is_a? String | ||
assert_not_english(Faker::Restaurant.name) | ||
assert Faker::Restaurant.type.is_a? String | ||
assert_not_english(Faker::Restaurant.type) | ||
end | ||
|
||
def test_ja_space_methods | ||
assert Faker::Space.planet.is_a? String | ||
assert_not_english(Faker::Space.planet) | ||
assert Faker::Space.galaxy.is_a? String | ||
end | ||
|
||
def test_ja_university_methods | ||
assert Faker::University.prefix.is_a? String | ||
assert_not_english(Faker::University.prefix) | ||
assert Faker::University.suffix.is_a? String | ||
assert_not_english(Faker::University.suffix) | ||
assert Faker::University.name.is_a? String | ||
assert_not_english(Faker::University.name) | ||
end | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jpananese address not have street_suffix in first_name and street_suffix.