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::HeyArnold (faker-ruby#855)
- Loading branch information
Showing
5 changed files
with
70 additions
and
1 deletion.
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,10 @@ | ||
# Faker::HeyArnold | ||
|
||
```ruby | ||
|
||
Faker::HeyArnold.character #=> "Arnold" | ||
|
||
Faker::HeyArnold.location #=> "Big Bob's Beeper Emporium" | ||
|
||
Faker::HeyArnold.quote #=> "Stoop Kid's afraid to leave his stoop!" | ||
``` |
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 HeyArnold < Base | ||
class << self | ||
def character | ||
fetch('hey_arnold.characters') | ||
end | ||
|
||
def location | ||
fetch('hey_arnold.locations') | ||
end | ||
|
||
def quote | ||
fetch('hey_arnold.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
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 TestFakerHeyArnold < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::HeyArnold | ||
end | ||
|
||
def test_character | ||
assert @tester.character.match(/\w+/) | ||
end | ||
|
||
def test_location | ||
assert @tester.location.match(/\w+/) | ||
end | ||
|
||
def test_quote | ||
assert @tester.quote.match(/\w+/) | ||
end | ||
end |