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 Faker::SouthPark (faker-ruby#1314)
* Added south park feature * Renamed south_park.doc to south_park.md * Updated README to reflect newly added SouthPark feature * Update CHANGELOG.md
- Loading branch information
1 parent
b037b85
commit 4ed55ef
Showing
6 changed files
with
46 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,7 @@ | ||
# Faker::SouthPark | ||
|
||
```ruby | ||
Faker::SouthPark.character #=> "Mr. Garrison" | ||
|
||
Faker::SouthPark.quote #=> "I'm just getting a little cancer Stan" | ||
``` |
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 @@ | ||
# frozen_string_literal: true | ||
|
||
module Faker | ||
class SouthPark < Base | ||
class << self | ||
def character | ||
fetch('south_park.characters') | ||
end | ||
|
||
def quote | ||
fetch('south_park.quotes') | ||
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,5 @@ | ||
en: | ||
faker: | ||
south_park: | ||
characters: ["Sharon Marsh", "Officer Barbrady", "Jesus", "Token Black", "Dr. Alphonse Mephesto", "Stephen Stotch", "Heidi Turner", "Jimmy Valmer", "Sheila Broflovski", "Jimbo Kern", "Ike Broflovski", "Kevin McCormick", "Father Maxi", "Grandpa Marvin Marsh", "Clyde Donovan", "Butters Stotch", "Shelly Marsh", "Kyle Broflovski", "Stuart McCormick", "Carol McCormick", "Timmy Burch", "Ned Gerblansky", "Mr. Mackey", "Satan", "Moses", "PC Principal", "Bradley Biggle", "Randy Marsh", "Kenny McCormick", "Terrance and Phillip", "Mr. Slave", "Sergeant Harrison Yates", "Lemmiwinks", "Mr. Hankey", "Wendy Testaburger", "Santa", "God", "Stan Marsh", "Towelie", "Gerald Broflovski", "Bebe Stevens", "Starvin' Marvin", "Karen McCormick", "David Rodriguez", "Eric Cartman", "Mayor McDaniels", "Tuong Lu Kim", "Tweek Tweak", "Dougie", "Craig Tucker", "Mr. Garrison", "Pip", "Liane Cartman", "Scott Malkinson", "Linda Stotch"] | ||
quotes: ["Hippies. They're everywhere. They wanna save Earth, but all they do is smoke pot and smell bad", "They took our deers", "Kenny’s family is so poor that yesterday, they had to put their cardboard box up for a second mortgage", "Without evil there could be no good, so it must be good to be evil sometimes", "Dad, Tom Cruise won't come out of the closet!", "They took der derrs", "I'm not just sure, I'm HIV positive", "I don't make the rules Kyle, I simply think them up and write them down", "I'm just getting a little cancer Stan", "Respect my authoritaahh!!!", "Your mother was worried sick and I was here drinking beer", "Hey Panda Bear! We don't take kindly to your types around here.", "You know what they say: You can't teach a gay dog straight tricks", "They took our jobs", "Maybe we should send you to a concentration camp", "Life is short butters, & thats why you have to do whatever you want all the time", "No we haven't actually seen it Tom, we're just reporting it"] |
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 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'test_helper' | ||
|
||
class TestFakerSouthPark < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::SouthPark | ||
end | ||
|
||
def test_character | ||
assert @tester.character.match(/\w+/) | ||
end | ||
|
||
def test_quote | ||
assert @tester.quote.match(/\w+/) | ||
end | ||
end |