Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

seinfeld faker #936

Merged
merged 4 commits into from
Jul 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Contents
- [Faker::Robin](doc/robin.md)
- [Faker::RockBand](doc/rock_band.md)
- [Faker::RuPaul](doc/rupaul.md)
- [Faker::Seinfeld](doc/seinfeld.md)
- [Faker::Simpsons](doc/simpsons.md)
- [Faker::SlackEmoji](doc/slack_emoji.md)
- [Faker::Space](doc/space.md)
Expand Down
8 changes: 8 additions & 0 deletions doc/seinfeld.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Faker::Seinfeld

```ruby
Faker::Seinfeld.character #=> George Costanza

Faker::Seinfeld.quote #=> I'm not a lesbian. I hate men, but I'm not a lesbian

```
13 changes: 13 additions & 0 deletions lib/faker/seinfeld.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module Faker
class Seinfeld < Base
class << self
def character
fetch('seinfeld.character')
end

def quote
fetch('seinfeld.quote')
end
end
end
end
4 changes: 4 additions & 0 deletions lib/locales/en.yml

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions test/test_faker_seinfeld.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')

class TestFakerSeinfeld < Test::Unit::TestCase

def setup
@tester = Faker::Seinfeld
end

def test_character
assert @tester.character.match(/\w+/)
end

def test_quote
assert @tester.quote.match(/\w+/)
end
end