diff --git a/doc/games/world_of_warcraft.md b/doc/games/world_of_warcraft.md index 78473e49a1..ace6655b3c 100644 --- a/doc/games/world_of_warcraft.md +++ b/doc/games/world_of_warcraft.md @@ -1,9 +1,15 @@ # Faker::Games::WorldOfWarcraft ```ruby -# Generate random character from the World of Warcraft +# Generate a random character from World of Warcraft Faker::Games::WorldOfWarcraft.hero #=> "Uther the Lightbringer" -# Generate random quote from the World of Warcraft +# Generate a random class name from World of Warcraft +Faker::Games::WorldOfWarcraft.class_name #=> "Druid" + +# Generate a random class name from World of Warcraft +Faker::Games::WorldOfWarcraft.race #=> "Night elf" + +# Generate a random quote from World of Warcraft Faker::Games::WorldOfWarcraft.quote #=> "These are dark times indeed." ``` diff --git a/lib/faker/games/world_of_warcraft.rb b/lib/faker/games/world_of_warcraft.rb index 4fa9802c20..005bb076cb 100644 --- a/lib/faker/games/world_of_warcraft.rb +++ b/lib/faker/games/world_of_warcraft.rb @@ -14,7 +14,32 @@ class << self # # @faker.version 1.9.2 def hero - fetch('games.world_of_warcraft.hero') + fetch('games.world_of_warcraft.heros') + end + + ## + # Produces a class name from World of Warcraft. + # + # @return [String] + # + # @example + # Faker::Games::WorldOfWarcraft.class_name #=> "Druid" + # + # @faker.version next + def class_name + fetch('games.world_of_warcraft.class_names') + end + + # Produces the name of a race from World of Warcraft. + # + # @return [String] + # + # @example + # Faker::Games::WorldOfWarcraft.race #=> "Druid" + # + # @faker.version next + def race + fetch('games.world_of_warcraft.races') end ## diff --git a/lib/locales/en/world_of_warcraft.yml b/lib/locales/en/world_of_warcraft.yml index d6801d0a7a..2a825f4c2b 100644 --- a/lib/locales/en/world_of_warcraft.yml +++ b/lib/locales/en/world_of_warcraft.yml @@ -2,7 +2,125 @@ en: faker: games: world_of_warcraft: - hero: ["Gul'dan", "Durotan", "Khadgar", "Orgrim Doomhammer", "Medivh", "Blackhand", "Anduin Lothar", "Garona Halforcen", "Antonidas", "King Llane Wrynn", "Moroes", - "Lady Taria", "Jaina Proudmoore", "Illidan Stormrage", "Kael'thas Sunstrider", "Archimonde", "Kil'jaeden", "Mannoroth", "Ner'zhul", "Sargeras", "Balnazzar", "Magtheridon", "Mal'Ganis", "Brann Bronzebeard", "Muradin Bronzebeard", "Sylvanas Windrunner", "Malfurion Stormrage", "Millhouse Manastorm", "Anduin Lothar", "Arthas Menthil", "Bolvar Fordragon", "Uther the Lightbringer", "Varian Wrynn"] - - quotes: ["An'u belore delen'na.","Anaria Shola.","Bal'a dash, malanore.","Glory to the Sin'dorei.","Our enemies will fall!","State your business.","The dark times will pass.","The Eternal Sun guides us.","Victory lies ahead!","We will persevere!","What business have you?","Yes?","Death to all who oppose us!", "Farewell.", "Hold your head high.", "Keep your wits about you.", "Remember the Sunwell.", "Sela'ma ashal'anore!", "Shorel'aran.", "Stay the course", "The reckoning is at hand!", "Time is of the essence.", "We will have justice!", "Ah, you have a death wish.", "I do not suffer fools easily.", "I had little patience to begin with!", "Mind yourself.", "Not very intelligent, are you?", "Run away pest!", "These are dark times indeed.", "Why do you linger?", "You waste my time.", "Choose wisely.", "Do not loiter.", "Everything has a price.", "I have one of a kind items.", "What do you seek?", "Your gold is welcome here.", "Glory to the Sin'dorei.", "State your Business!", "Anu'belore Dela'na.", "The Eternal Sun guides us.", "What Business have you?", "Victory lies ahead.", "Our enemies will fall.", "Anaria'shoala.", "You waste my time.", "I had little patience to begin with.", "It is a wonder you have lived this long.", "Ah, you have a death wish.", "I sell only the finest goods.", "Your gold is welcome here.", "Everything has a price.", "Do not loiter."] + heros: + - Gul'dan + - Durotan + - Khadgar + - Orgrim Doomhammer + - Medivh + - Blackhand + - Anduin Lothar + - Garona Halforcen + - Antonidas + - King Llane Wrynn + - Moroes + - Lady Taria + - Jaina Proudmoore + - Illidan Stormrage + - Kael'thas Sunstrider + - Archimonde + - Kil'jaeden + - Mannoroth + - Ner'zhul + - Sargeras + - Balnazzar + - Magtheridon + - Mal'Ganis + - Brann Bronzebeard + - Muradin Bronzebeard + - Sylvanas Windrunner + - Malfurion Stormrage + - Millhouse Manastorm + - Anduin Lothar + - Arthas Menthil + - Bolvar Fordragon + - Uther the Lightbringer + - Varian Wrynn + quotes: + - An'u belore delen'na. + - Anaria Shola. + - Bal'a dash, malanore. + - Glory to the Sin'dorei. + - Our enemies will fall! + - State your business. + - The dark times will pass. + - The Eternal Sun guides us. + - Victory lies ahead! + - We will persevere! + - What business have you? + - Death to all who oppose us! + - Hold your head high. + - Keep your wits about you. + - Remember the Sunwell. + - Sela'ma ashal'anore! + - Shorel'aran. + - Stay the course + - The reckoning is at hand! + - Time is of the essence. + - We will have justice! + - Ah, you have a death wish. + - I do not suffer fools easily. + - I had little patience to begin with! + - Mind yourself. + - Not very intelligent, are you? + - Run away pest! + - These are dark times indeed. + - Why do you linger? + - You waste my time. + - Choose wisely. + - Do not loiter. + - Everything has a price. + - I have one of a kind items. + - What do you seek? + - Your gold is welcome here. + - Glory to the Sin'dorei. + - State your Business! + - Anu'belore Dela'na. + - The Eternal Sun guides us. + - What Business have you? + - Victory lies ahead. + - Our enemies will fall. + - Anaria'shoala. + - You waste my time. + - I had little patience to begin with. + - It is a wonder you have lived this long. + - Ah, you have a death wish. + - I sell only the finest goods. + - Your gold is welcome here. + - Everything has a price. + - Do not loiter. + class_names: + - Death Knight + - Demon Hunter + - Druid + - Hunter + - Mage + - Monk + - Paladin + - Priest + - Rogue + - Shaman + - Warlock + - Warrior + races: + - Draenei + - Dwarf + - Gnome + - Human + - Night elf + - Worgen + - Void elf + - Lightforged + - Dark Iron + - Kul Tiran + - Pandaren + - Blood elf + - Goblin + - Orc + - Tauren + - Troll + - Undead + - Nightborne + - Highmountain + - Mag'har + - Zandalari diff --git a/test/faker/games/test_faker_world_of_warcraft.rb b/test/faker/games/test_faker_world_of_warcraft.rb index f11d5702e0..5e8225a759 100644 --- a/test/faker/games/test_faker_world_of_warcraft.rb +++ b/test/faker/games/test_faker_world_of_warcraft.rb @@ -11,6 +11,14 @@ def test_heroes assert @tester.hero.match(/\w+/) end + def test_class_names + assert @tester.class_name.match(/\w+/) + end + + def test_races + assert @tester.race.match(/\w+/) + end + def test_quotes assert @tester.quote.match(/\w+/) end