Skip to content
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 Faker::Music#mambo_no_5, a Generator for Random First Names that Appear in Lou Bega's Mambo No. 5 #1910

Merged
merged 9 commits into from Apr 13, 2021
2 changes: 2 additions & 0 deletions doc/music/music.md
Expand Up @@ -14,4 +14,6 @@ Faker::Music.band #=> "The Beatles"
Faker::Music.album #=> "Sgt. Pepper's Lonely Hearts Club"

Faker::Music.genre #=> "Rock"

Faker::Music.mambo_no_5 #=> "Monica"
```
12 changes: 12 additions & 0 deletions lib/faker/music/music.rb
Expand Up @@ -128,6 +128,18 @@ def album
def genre
fetch('music.genres')
end

##
# Produces a name from Lou Bega's Mambo #5
#
# @return [String]
#
# @example
# Faker::Music.mambo #=> "Monica"
# @faker.version 2.17.0
NickyEXE marked this conversation as resolved.
Show resolved Hide resolved
def mambo_no_5
fetch('music.mambo_no_5')
end
end
end
end
10 changes: 10 additions & 0 deletions lib/locales/en/music.yml
Expand Up @@ -310,6 +310,16 @@ en:
- Blues
- Non Music
- Rap
mambo_no_5:
- Angela
- Pamela
- Sandra
- Rita
- Monica
- Erica
- Tina
- Mary
- Jessica
hiphop:
subgenres:
- Low Fi
Expand Down
4 changes: 4 additions & 0 deletions test/faker/music/test_faker_music.rb
Expand Up @@ -60,4 +60,8 @@ def test_album
def test_genre
assert @tester.genre.match(/\w+/)
end

def test_mambo_no_5
assert @tester.mambo_no_5.match(/\w+/)
end
end