forked from faker-ruby/faker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add how to train your dragon (faker-ruby#2158)
* Add how to train your dragon data * add newline to end of file Co-authored-by: Stephen A. Wilson <stephen-356@hotmail.com>
- Loading branch information
Showing
5 changed files
with
251 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Faker::Movies::HowToTrainYourDragon | ||
|
||
```ruby | ||
Faker::Movies::HowToTrainYourDragon.character #=> "Hiccup" | ||
Faker::Movies::HowToTrainYourDragon.location #=> "Berk" | ||
Faker::Movies::HowToTrainYourDragon.dragon #=> "Toothless" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# frozen_string_literal: true | ||
|
||
module Faker | ||
class Movies | ||
class HowToTrainYourDragon < Base | ||
class << self | ||
## | ||
# Produces a character from How To Train Your Dragon. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Movies::HowToTrainYourDragon.character #=> "Hiccup" | ||
# | ||
# @faker.version next | ||
def character | ||
fetch('how_to_train_your_dragon.characters') | ||
end | ||
|
||
## | ||
# Produces a location from How To Train Your Dragon. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Movies::HowToTrainYourDragon.location #=> "Berk" | ||
# | ||
# @faker.version next | ||
def location | ||
fetch('how_to_train_your_dragon.locations') | ||
end | ||
|
||
## | ||
# Produces a dragon from How To Train Your Dragon. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Movies::HowToTrainYourDragon.dragons #=> "Toothless" | ||
# | ||
# @faker.version next | ||
def dragon | ||
fetch('how_to_train_your_dragon.dragons') | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
en: | ||
faker: | ||
how_to_train_your_dragon: | ||
characters: | ||
- Agnar | ||
- Agnut Thorston | ||
- Alvin the Treacherous | ||
- Arick Denson | ||
- Arngrim Dammen | ||
- Astrid Hofferson | ||
- Axel Finke | ||
- Axel Skeptisson | ||
- Drago Bludvist | ||
- Bucket | ||
- Buffnut | ||
- Cleftjaw | ||
- Dagur the Deranged | ||
- Derrick | ||
- Eret, Son of Eret | ||
- Fenris Thorston | ||
- Fishlegs Ingerman | ||
- Flora May | ||
- Froglegs | ||
- Gobber the Belch | ||
- Gothi | ||
- Gruffnut Thorston | ||
- Gustav Larson | ||
- Hagan Frostbeard | ||
- Heather | ||
- Hiccup | ||
- Hildegard | ||
- Ingar Ingerman | ||
- Iron Mason | ||
- Jens Henderson | ||
- Jorgen Redboot | ||
- Krogan | ||
- Maeve | ||
- Mala | ||
- Mildew | ||
- Nuffink Haddock | ||
- Oswald the Agreeable | ||
- Padraig | ||
- Piglegs | ||
- Ruffnut | ||
- Ryker Grimborn | ||
- Savage | ||
dragons: | ||
- Axewing | ||
- Barf and Belch | ||
- Beachcomber | ||
- Bewilderbeast | ||
- Blazewing | ||
- Bonesnarl | ||
- Bonnefire | ||
- Borealis | ||
- Butt and Head | ||
- Cagecruncher | ||
- Carnastial | ||
- Cheesemonger | ||
- Chompers | ||
- Cloudjumper | ||
- Darkvarg | ||
- Earsplitter | ||
- Fishmeat | ||
- Ghostglow | ||
- Gressjester | ||
- Hookfire | ||
- Icebane | ||
- Incognito | ||
- Irontooth | ||
- Krustler | ||
- Meatlug | ||
- Nightwatch | ||
- Obskewer | ||
- Reignstorm | ||
- Rhineblow | ||
- Scardian | ||
- Sentinel | ||
- Skullcrusher | ||
- Smidvarg | ||
- Snifflestone | ||
- Snogglewing | ||
- Stormfly | ||
- Thornado | ||
- Thorntail | ||
- Thunderfish | ||
- Toothless | ||
- Tripfire | ||
- Valdwail | ||
- Wavewight | ||
- Windshear | ||
- Winterwick | ||
- Wonderclap | ||
- Zeppla | ||
locations: | ||
- Algae Island | ||
- Armorwing Island | ||
- Askeblad Island | ||
- Barbaric Archipelago | ||
- Belching Bog | ||
- Berk | ||
- Berserker Island | ||
- Boarhead Island | ||
- Breakneck Bog | ||
- Caves of Jotunn | ||
- Changewing Island | ||
- Clover Coast | ||
- Dark Deep | ||
- Dark Harbor | ||
- Dragon Island | ||
- Eastern Strait | ||
- Eel Island | ||
- Eternitree | ||
- Everfrost Forest | ||
- Fireworm Island | ||
- Gronckle Island | ||
- Hazard Island | ||
- Hidden World | ||
- Hobblegrunt Island | ||
- Horrendous Point | ||
- Hunter Island | ||
- Huttsgalor | ||
- Icestorm Island | ||
- Island of Friga | ||
- Itchy Armpit | ||
- Jotun Hot Springs | ||
- Knucklebone Knoll | ||
- Maze Caves | ||
- Melody Island | ||
- Misty Backwoods | ||
- Mount Ymir | ||
- New Berk | ||
- Northern Swamp | ||
- Outcast Island | ||
- Pointy Point | ||
- Puffin Point | ||
- Quaking Cavern | ||
- Radiant Meadows | ||
- Ragnarok Rock | ||
- Raven Point | ||
- Rookery | ||
- Rough Sands | ||
- Scriven Rock | ||
- Scuttleclaw Island | ||
- Sea of Despair | ||
- Ship Graveyard | ||
- Shivering Shores | ||
- Shredstone Walls | ||
- Snoggletog Island | ||
- Sparkfire Mountain | ||
- Speed Stinger Island | ||
- Straits of Baldur | ||
- Sullen Sea | ||
- Sundering Wastes | ||
- Sunken City | ||
- Sunstone Island | ||
- Thornbane Valley | ||
- Thunderhead Bay | ||
- Timberjack Hollow | ||
- Titan Island | ||
- Training Arena | ||
- Trembling Faults | ||
- Uglythug Lands | ||
- Valhalla | ||
- Valka's Mountain | ||
- Vanaheim | ||
- Viking Cliff | ||
- Vinland | ||
- Wild Woodland | ||
- Windswept Ruin | ||
- Woolly Canyon | ||
- Wreck Reef | ||
- Zippleback Island | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../../test_helper' | ||
|
||
class TestFakerHowToTrainYourDragon < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::Movies::HowToTrainYourDragon | ||
end | ||
|
||
def test_character | ||
assert @tester.character.match(/\w+/) | ||
end | ||
|
||
def test_location | ||
assert @tester.location.match(/\w+/) | ||
end | ||
|
||
def test_dragon | ||
assert @tester.dragon.match(/\w+/) | ||
end | ||
end |