-
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.
Includes Ancient Greek gods, primordial deities, titans and common mortal heroes Closes #765
- Loading branch information
Showing
5 changed files
with
65 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,21 @@ | ||
module Faker | ||
class Ancient < Base | ||
class << self | ||
def god | ||
fetch('ancient.god') | ||
end | ||
|
||
def primordial | ||
fetch('ancient.primordial') | ||
end | ||
|
||
def titan | ||
fetch('ancient.titan') | ||
end | ||
|
||
def hero | ||
fetch('ancient.hero') | ||
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,24 @@ | ||
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb') | ||
|
||
class TestFakerAncient < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::Ancient | ||
end | ||
|
||
def test_god | ||
assert @tester.god.match(/\w+/) | ||
end | ||
|
||
def test_primordial | ||
assert @tester.primordial.match(/\w+/) | ||
end | ||
|
||
def test_titan | ||
assert @tester.titan.match(/\w+/) | ||
end | ||
|
||
def test_hero | ||
assert @tester.hero.match(/\w+/) | ||
end | ||
|
||
end |