-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Patrick Rothfuss's Kingkiller Chronicle books.
- Loading branch information
Showing
5 changed files
with
91 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,9 @@ | ||
# Faker::Books::KingkillerChronicle | ||
|
||
```ruby | ||
Faker::Books::KingkillerChronicle.quote #=> "The boy grows upward, but the girl grows up." | ||
|
||
Faker::Books::KingkillerChronicle.character #=> "Bast" | ||
|
||
Faker::Books::KingkillerChronicle.city #=> "Imre" | ||
``` |
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 | ||
|
||
module Faker | ||
class Books | ||
class KingkillerChronicle < Base | ||
class << self | ||
def character | ||
fetch('kingkiller_chronicle.character') | ||
end | ||
|
||
def city | ||
fetch('kingkiller_chronicle.city') | ||
end | ||
|
||
def quote | ||
fetch('kingkiller_chronicle.quote') | ||
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,39 @@ | ||
en: | ||
faker: | ||
kingkiller_chronicle: | ||
character: | ||
- Kvothe | ||
- Bast | ||
- Kilvin | ||
- Auri | ||
- Ambrose | ||
- Felurian | ||
- Denna | ||
- Devi | ||
- Elodin | ||
- Fela | ||
- Manet | ||
- Simmon | ||
- Tempi | ||
- Willem | ||
city: | ||
- Abbott's Ford | ||
- Levinshir | ||
- Myr Tariniel | ||
- Newarre | ||
- Severen | ||
- Hallowfell | ||
- Imre | ||
- Tarbean | ||
- Trebon | ||
- Tenuë | ||
quote: | ||
- "There are three things all wise men fear: the sea in storm, a night with no moon, and the anger of a gentle man." | ||
- "It's like everyone tells a story about themselves inside their own head. Always. All the time. That story makes you what you are. We build ourselves out of that story." | ||
- "Words are pale shadows of forgotten names. As names have power, words have power. Words can light fires in the minds of men. Words can wring tears from the hardest hearts." | ||
- "Half of seeming clever is keeping your mouth shut at the right times." | ||
- "We love what we love. Reason does not enter into it. In many ways, unwise love is the truest love. Anyone can love a thing because. That's as easy as putting a penny in your pocket. But to love something despite. To know the flaws and love them too. That is rare and pure and perfect." | ||
- "Bones mend. Regret stays with you forever." | ||
- "Books are a poor substitute for female companionship, but they are easier to find." | ||
- "Only priests and fools are fearless and I've never been on the best of terms with God." | ||
- "The boy grows upward, but the girl grows up." |
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 TestFakerBooksKingkillerChronicle < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::Books::KingkillerChronicle | ||
end | ||
|
||
def test_character | ||
assert @tester.character.match(/\w+/) | ||
end | ||
|
||
def test_city | ||
assert @tester.city.match(/\w+/) | ||
end | ||
|
||
def test_quote | ||
assert @tester.quote.match(/\w+/) | ||
end | ||
end |