-
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.
- Loading branch information
1 parent
70ff61d
commit 5843988
Showing
5 changed files
with
54 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
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,17 @@ | ||
module Faker | ||
class GameOfThrones < Base | ||
class << self | ||
def character | ||
fetch('game_of_thrones.characters') | ||
end | ||
|
||
def house | ||
fetch('game_of_thrones.houses') | ||
end | ||
|
||
def city | ||
fetch('game_of_thrones.cities') | ||
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
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,19 @@ | ||
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb') | ||
|
||
class TestFakerGameOfThrones < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::GameOfThrones | ||
end | ||
|
||
def test_character | ||
assert @tester.character.match(/\w+/) | ||
end | ||
|
||
def test_house | ||
assert @tester.house.match(/\w+/) | ||
end | ||
|
||
def test_city | ||
assert @tester.city.match(/\w+/) | ||
end | ||
end |