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 Final Space to TvShows category (faker-ruby#2147)
- Loading branch information
Showing
5 changed files
with
119 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,9 @@ | ||
# Faker::TvShows::FinalSpace | ||
|
||
```ruby | ||
Faker::TvShows::FinalSpace.character #=> "Gary Goodspeed" | ||
|
||
Faker::TvShows::FinalSpace.vehicle #=> "Imperium Cruiser" | ||
|
||
Faker::TvShows::FinalSpace.quote #=> "It's an alien on my face! It's an alien on my...It's a space alien!" | ||
``` |
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,51 @@ | ||
# frozen_string_literal: true | ||
|
||
module Faker | ||
class TvShows | ||
class FinalSpace < Base | ||
flexible :final_space | ||
|
||
class << self | ||
## | ||
# Produces a character from Final Space. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::TvShows::FinalSpace.character #=> "Gary Goodspeed" | ||
# | ||
# @faker.version next | ||
def character | ||
fetch('final_space.characters') | ||
end | ||
|
||
## | ||
# Produces a vehicle from Final Space. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::TvShows::FinalSpace.vehicle #=> "Imperium Cruiser" | ||
# | ||
# @faker.version next | ||
def vehicle | ||
fetch('final_space.vehicles') | ||
end | ||
|
||
## | ||
# Produces a quote from Final Space. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::TvShows::FinalSpace.quote | ||
# #=> "It's an alien on my face! It's an alien on my...It's a space alien!" | ||
# | ||
# @faker.version next | ||
def quote | ||
fetch('final_space.quotes') | ||
end | ||
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,37 @@ | ||
en: | ||
faker: | ||
final_space: | ||
characters: | ||
- A.V.A | ||
- Ash Graven | ||
- Avocato | ||
- Bolo | ||
- Clarence | ||
- Gary Goodspeed | ||
- H.U.E | ||
- John Goodspeed | ||
- KVN | ||
- Little Cato | ||
- Lord Commander | ||
- Mooncake | ||
- Nighfall | ||
- Quinn Ergon | ||
- Sheryl Goodspeed | ||
|
||
vehicles: | ||
- Crimson Light | ||
- Galaxy One | ||
- Imperium Cruiser | ||
- F71 Hawk | ||
- Heavy Incinerator | ||
- Star Chaser | ||
|
||
quotes: | ||
- It's an alien on my face! It's an alien on my...It's a space alien! | ||
- Get. Your. Finger. Out. Of. My. TUMMY! | ||
- Chookity | ||
- Twist my nipples rough | ||
- Let's get wild, how about you buy me a drink | ||
- Hey kids, it's me, your mother | ||
- That's not a cookie. And you know that HUE, you know that! | ||
- Get off my cheeks HUE! |
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 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../../test_helper' | ||
|
||
class TestFakerTvShowsFinalSpace < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::TvShows::FinalSpace | ||
end | ||
|
||
def test_character | ||
assert @tester.character.match(/\w+/) | ||
end | ||
|
||
def test_vehicle | ||
assert @tester.vehicle.match(/\w+/) | ||
end | ||
|
||
def test_quote | ||
assert @tester.quote.match(/\w+/) | ||
end | ||
end |