Skip to content

Commit

Permalink
Add Faker::Music#mambo_no_5, a Generator for Random First Names that …
Browse files Browse the repository at this point in the history
…Appear in Lou Bega's Mambo No. 5 (#1910)
  • Loading branch information
NickyEXE committed Apr 13, 2021
1 parent 912632c commit b33a4e4
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
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 next
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

0 comments on commit b33a4e4

Please sign in to comment.