diff --git a/README.md b/README.md index fa1f055491..02aaa8ce02 100644 --- a/README.md +++ b/README.md @@ -376,7 +376,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'main - [Faker::JapaneseMedia::Naruto](doc/japanese_media/naruto.md) - [Faker::JapaneseMedia::Doraemon](doc/japanese_media/doraemon.md) - [Faker::JapaneseMedia::Conan](doc/japanese_media/conan.md) - - [Faker::JapaneseMedia::FmaBrotherhood](doc/japanese_media/fullmetal_alchemist_brotherhood.md) + - [Faker::JapaneseMedia::FullmetalAlchemistBrotherhood](doc/japanese_media/fullmetal_alchemist_brotherhood.md)
diff --git a/doc/japanese_media/fullmetal_alchemist_brotherhood.md b/doc/japanese_media/fullmetal_alchemist_brotherhood.md index 12c2ffa880..ddd6f1074e 100644 --- a/doc/japanese_media/fullmetal_alchemist_brotherhood.md +++ b/doc/japanese_media/fullmetal_alchemist_brotherhood.md @@ -1,9 +1,9 @@ -# Faker::JapaneseMedia::FmaBrotherhood +# Faker::JapaneseMedia::FullmetalAchemistBrotherhood ```ruby -Faker::JapaneseMedia::FmaBrotherhood.character #=> "Edward Elric" +Faker::JapaneseMedia::FullmetalAchemistBrotherhood.character #=> "Edward Elric" -Faker::JapaneseMedia::FmaBrotherhood.city #=> "Central City" +Faker::JapaneseMedia::FullmetalAchemistBrotherhood.city #=> "Central City" -Faker::JapaneseMedia::FmaBrotherhood.country #=> "Xing" +Faker::JapaneseMedia::FullmetalAchemistBrotherhood.country #=> "Xing" ``` diff --git a/lib/faker/japanese_media/fullmetal_alchemist_brotherhood.rb b/lib/faker/japanese_media/fullmetal_alchemist_brotherhood.rb index b07ba37609..493cdf51a0 100644 --- a/lib/faker/japanese_media/fullmetal_alchemist_brotherhood.rb +++ b/lib/faker/japanese_media/fullmetal_alchemist_brotherhood.rb @@ -2,47 +2,50 @@ module Faker class JapaneseMedia - class FmaBrotherhood < Base + class FullmetalAlchemistBrotherhood < Base class << self ## - # Produces a character from FmaBrotherhood. + # Produces a character from FullmetalAlchemistBrotherhood. # # @return [String] # # @example - # Faker::JapaneseMedia::FmaBrotherhood.character #=> "Edward Elric" + # Faker::JapaneseMedia::FullmetalAlchemistBrotherhood.character #=> "Edward Elric" # # @faker.version next def character - fetch('fma_brotherhood.characters') + fetch('fullmetal_alchemist_brotherhood.characters') end ## - # Produces a cities from FmaBrotherhood. + # Produces a cities from FullmetalAlchemistBrotherhood. # # @return [String] # # @example - # Faker::JapaneseMedia::FmaBrotherhood.city #=> "Central City" + # Faker::JapaneseMedia::FullmetalAlchemistBrotherhood.city #=> "Central City" # # @faker.version next def city - fetch('fma_brotherhood.cities') + fetch('fullmetal_alchemist_brotherhood.cities') end ## - # Produces a country from FmaBrotherhood. + # Produces a country from FullmetalAlchemistBrotherhood. # # @return [String] # # @example - # Faker::JapaneseMedia::FmaBrotherhood.country #=> "Xing" + # Faker::JapaneseMedia::FullmetalAlchemistBrotherhood.country #=> "Xing" # # @faker.version next def country - fetch('fma_brotherhood.countries') + fetch('fullmetal_alchemist_brotherhood.countries') end end end + + include Faker::Deprecator + deprecate_generator('FmaBrotherhood', FullmetalAlchemistBrotherhood) end end diff --git a/lib/locales/en/fma_brotherhood.yml b/lib/locales/en/fullmetal_alchemist_brotherhood.yml similarity index 95% rename from lib/locales/en/fma_brotherhood.yml rename to lib/locales/en/fullmetal_alchemist_brotherhood.yml index d83966071c..6061fe4093 100644 --- a/lib/locales/en/fma_brotherhood.yml +++ b/lib/locales/en/fullmetal_alchemist_brotherhood.yml @@ -1,6 +1,6 @@ en: faker: - fma_brotherhood: + fullmetal_alchemist_brotherhood: characters: - Edward Elric - Alphonse Elric @@ -8,7 +8,7 @@ en: - Riza Hawkeye - Scar - Winry Rockbell - - May Chang + - May Chang - Maes Hughes - Alex Louis Armstrong - Jean Havoc @@ -47,7 +47,7 @@ en: - Isaac McDougal - Solf J. Kimblee - Van Hohenheim - - Fu + - Fu - Ling Yao - Lan Fan - Olivier Mira Armstrong diff --git a/test/faker/japanese_media/test_faker_fullmetal_alchemist_brotherhood.rb b/test/faker/japanese_media/test_faker_fullmetal_alchemist_brotherhood.rb index ad23e96de1..f651796a6a 100644 --- a/test/faker/japanese_media/test_faker_fullmetal_alchemist_brotherhood.rb +++ b/test/faker/japanese_media/test_faker_fullmetal_alchemist_brotherhood.rb @@ -19,3 +19,21 @@ def test_country assert_match(/\w+/, @tester.country) end end + +class TestFakerFullmetalAlchemistBrotherhood < Test::Unit::TestCase + def setup + @tester = Faker::JapaneseMedia::FullmetalAlchemistBrotherhood + end + + def test_character + assert_match(/\w+/, @tester.character) + end + + def test_city + assert_match(/\w+/, @tester.city) + end + + def test_country + assert_match(/\w+/, @tester.country) + end +end