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
Showing
5 changed files
with
43 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::ParksAndRec | ||
|
||
```ruby | ||
Faker::ParksAndRec.character #=> "Leslie Knope" | ||
|
||
Faker::ParksAndRec.city #=> "Pawnee" | ||
``` |
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,13 @@ | ||
module Faker | ||
class ParksAndRec < Base | ||
class << self | ||
def character | ||
fetch('parks_and_rec.characters') | ||
end | ||
|
||
def city | ||
fetch('parks_and_rec.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
en: | ||
faker: | ||
parks_and_rec: | ||
characters: ["Leslie Knope","Ron Swanson","Ann Perkins","Mark Brendanawicz","Tom Haverford","April Ludgate","Andy Dwyer","Jerry Gergich", | ||
"Donna Meagle","Ben Wyatt","Chris Traeger","Craig Middlebrooks","Jean-Ralphio Saperstein","Li'l Sebastian","Mona-Lisa Saperstein","Orin", | ||
"Tammy 1","Tammy 2","Tammy Zero","Jeremy Jamm","Ethel Beavers","Crazy Ira","The Douche","Joan Callamezzo","Perd Hapley","Shauna Malwae-Tweep","Bobby Newport","Dr. Richard Nygard"] | ||
cities: ["Pawnee","Eagleton","Boraqua"] |
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,15 @@ | ||
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb') | ||
|
||
class TestFakerParksAndRec < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::ParksAndRec | ||
end | ||
|
||
def test_character | ||
assert @tester.character.match(/\w+/) | ||
end | ||
|
||
def test_city | ||
assert @tester.city.match(/\w+/) | ||
end | ||
end |