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
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -268,6 +268,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
### Music
- [Faker::Music](doc/music/music.md)
- [Faker::Music::GratefulDead](doc/music/grateful_dead.md)
- [Faker::Music::Mambo](doc/music/mambo.md)
- [Faker::Music::Opera](doc/music/opera.md)
- [Faker::Music::Phish](doc/music/phish.md)
- [Faker::Music::RockBand](doc/music/rock_band.md)
Expand Down
6 changes: 6 additions & 0 deletions doc/music/mambo.md
@@ -0,0 +1,6 @@
# Faker::Music::Mambo

```ruby
Faker::Music::Mambo.name #=> "Monica"

```
22 changes: 22 additions & 0 deletions lib/faker/music/mambo.rb
@@ -0,0 +1,22 @@
# frozen_string_literal: true

module Faker
class Music
class Mambo < Base
class << self
##
# Produces the name of someone that Lou Bega wants a little bit of, according to his hit 1999 song "Mambo No. 5 (A Little Bit of...)"
#
# @return [String]
#
# @example
# Faker::Music::Mambo.name #=> "Monica"
#
# @faker.version next
def name
fetch('mambo.name')
end
end
end
end
end
13 changes: 13 additions & 0 deletions lib/locales/mambo.yml
@@ -0,0 +1,13 @@
en:
faker:
mambo:
name:
- "Angela"
- "Pamela"
- "Sandra"
- "Rita"
- "Monica"
- "Erica"
- "Tina"
- "Mary"
- "Jessica"
psibi marked this conversation as resolved.
Show resolved Hide resolved
13 changes: 13 additions & 0 deletions test/faker/music/test_faker_mambo.rb
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require_relative '../../test_helper'

class TestFakerMambo < Test::Unit::TestCase
def setup
@tester = Faker::Music::Mambo
end

def test_name
assert @tester.name.match(/\w/)
end
end