-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add Faker::Nation.national_sport #1268
Conversation
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.
Unfortunately I think we already have a sport locale.
Take a look at Faker::Team.sport
.
I think you could add your locales there?
@vbrazo I have used the previously existing sport locals and added more sports to the locals. Please check. |
@@ -4,5 +4,5 @@ en: | |||
creature: ['ants', 'bats', 'bears', 'bees', 'birds', 'buffalo', 'cats', 'chickens', 'cattle', 'dogs', 'dolphins', 'ducks', 'elephants', 'fishes', 'foxes', 'frogs', 'geese', 'goats', 'horses', 'kangaroos', 'lions', 'monkeys', 'owls', 'oxen', 'penguins', 'people', 'pigs', 'rabbits', 'sheep', 'tigers', 'whales', 'wolves', 'zebras', 'banshees', 'crows', 'black cats', 'chimeras', 'ghosts', 'conspirators', 'dragons', 'dwarves', 'elves', 'enchanters', 'exorcists', 'sons', 'foes', 'giants', 'gnomes', 'goblins', 'gooses', 'griffins', 'lycanthropes', 'nemesis', 'ogres', 'oracles', 'prophets', 'sorcerors', 'spiders', 'spirits', 'vampires', 'warlocks', 'vixens', 'werewolves', 'witches', 'worshipers', 'zombies', 'druids'] | |||
name: | |||
- "#{Address.state} #{creature}" | |||
sport: ['baseball', 'basketball', 'football', 'hockey', 'rugby', 'lacrosse', 'soccer'] | |||
sport: ['baseball', 'basketball', 'football', 'hockey', 'rugby', 'lacrosse', 'soccer', 'buzkashi', 'cricket', 'kabaddi', 'archery', 'field hockey', 'wrestling', 'association', 'sumo', 'dandi biyo', 'league', 'arnis', 'bandy', 'taekwondo', 'volley ball', 'oil wrestling', 'handball', 'pesäpallo', 'rugby union', 'golf', 'bull fighting', 'shooting', 'gymnastics', 'water polo'] |
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.
❤️ 💛 🖤 💚 💙
|
||
def test_natinonal_sport | ||
assert @tester.national_sport.match(/(\w+\.? ?){2,3}/) | ||
end |
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.
👍
* Added test to check for national sport generator * Added national sports locals and codebase to fetch hem * Updated documentation * Used previously exisiting locals for sport and added more sport to the sport * Update changelog.md
This PR gives:
Here is issue link: #1267