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.
* Adding base files for Adjective Faker * Adding faker version * Passing required modifications * Commented out failing bank test * Adding link to commented test
- Loading branch information
Showing
5 changed files
with
248 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Faker::Adjective | ||
|
||
```ruby | ||
# Random Positive Adjective | ||
Faker::Adjective.positive #=> "Kind" | ||
|
||
# Random Negative Adjective | ||
Faker::Adjective.negative #=> "Creepy" | ||
``` |
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,35 @@ | ||
# frozen_string_literal: true | ||
|
||
module Faker | ||
class Adjective < Base | ||
flexible :adjective | ||
|
||
class << self | ||
## | ||
# Produces a positive adjective. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Adjective.positive #=> "Kind" | ||
# | ||
# @faker.version next | ||
def positive | ||
fetch('adjective.positive') | ||
end | ||
|
||
## | ||
# Produces a negative adjective. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Adjective.negative #=> "Creepy" | ||
# | ||
# @faker.version next | ||
def negative | ||
fetch('adjective.negative') | ||
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,179 @@ | ||
en: | ||
faker: | ||
adjective: | ||
positive: | ||
- 'adorable' | ||
- 'adventurous' | ||
- 'agreeable' | ||
- 'attractive' | ||
- 'beautiful' | ||
- 'brainy' | ||
- 'brave' | ||
- 'bright' | ||
- 'calm' | ||
- 'charming' | ||
- 'cheerful' | ||
- 'clean' | ||
- 'clever' | ||
- 'colorful' | ||
- 'combative' | ||
- 'comfortable' | ||
- 'cooperative' | ||
- 'courageous' | ||
- 'curious' | ||
- 'cute' | ||
- 'delightful' | ||
- 'determined' | ||
- 'elegant' | ||
- 'enchanting' | ||
- 'encouraging' | ||
- 'energetic' | ||
- 'enthusiastic' | ||
- 'excited' | ||
- 'fair' | ||
- 'faithful' | ||
- 'famous' | ||
- 'fancy' | ||
- 'fantastic' | ||
- 'fine' | ||
- 'friendly' | ||
- 'funny' | ||
- 'gentle' | ||
- 'gifted' | ||
- 'glamorous' | ||
- 'gleaming' | ||
- 'glorious' | ||
- 'good' | ||
- 'gorgeous' | ||
- 'graceful' | ||
- 'handsome' | ||
- 'happy' | ||
- 'healthy' | ||
- 'helpful' | ||
- 'hilarious' | ||
- 'homely' | ||
- 'inexpensive' | ||
- 'innocent' | ||
- 'inquisitive' | ||
- 'jolly' | ||
- 'joyous' | ||
- 'kind' | ||
- 'light' | ||
- 'lively' | ||
- 'lovely' | ||
- 'lucky' | ||
- 'magnificent' | ||
- 'modern' | ||
- 'nice' | ||
- 'open' | ||
- 'outstanding' | ||
- 'perfect' | ||
- 'pleasant' | ||
- 'powerful' | ||
- 'precious' | ||
- 'proud' | ||
- 'quaint' | ||
- 'rich' | ||
- 'shiny' | ||
- 'smiling' | ||
- 'sparkling' | ||
- 'splendid' | ||
- 'spotless' | ||
- 'successful' | ||
- 'super' | ||
- 'talented' | ||
- 'tender' | ||
- 'tasty' | ||
- 'thankful' | ||
- 'thoughtful' | ||
- 'vast' | ||
- 'victorious' | ||
- 'vivacious' | ||
- 'witty' | ||
- 'zany' | ||
- 'zealous' | ||
negative: | ||
- 'aggressive' | ||
- 'annoyed' | ||
- 'anxious' | ||
- 'arrogant' | ||
- 'ashamed' | ||
- 'average' | ||
- 'awful' | ||
- 'bad' | ||
- 'bloody' | ||
- 'bored' | ||
- 'careful' | ||
- 'cautious' | ||
- 'concerned' | ||
- 'confused' | ||
- 'crazy' | ||
- 'creepy' | ||
- 'cruel' | ||
- 'dangerous' | ||
- 'depressed' | ||
- 'disturbed' | ||
- 'envious' | ||
- 'evil' | ||
- 'expensive' | ||
- 'exuberant' | ||
- 'filthy' | ||
- 'foolish' | ||
- 'fragile' | ||
- 'frail' | ||
- 'frantic' | ||
- 'frightened' | ||
- 'grieving' | ||
- 'grotesque' | ||
- 'grumpy' | ||
- 'helpless' | ||
- 'horrible' | ||
- 'ill' | ||
- 'itchy' | ||
- 'jealous' | ||
- 'jittery' | ||
- 'lazy' | ||
- 'lonely' | ||
- 'misty' | ||
- 'muddy' | ||
- 'nasty' | ||
- 'naughty' | ||
- 'nervous' | ||
- 'nutty' | ||
- 'obnoxious' | ||
- 'odd' | ||
- 'old-fashioned' | ||
- 'outrageous' | ||
- 'panicky' | ||
- 'poised' | ||
- 'poor' | ||
- 'putrid' | ||
- 'puzzled' | ||
- 'repulsive' | ||
- 'scary' | ||
- 'selfish' | ||
- 'shy' | ||
- 'silly' | ||
- 'sleepy' | ||
- 'smoggy' | ||
- 'sore' | ||
- 'stormy' | ||
- 'strange' | ||
- 'stupid' | ||
- 'terrible' | ||
- 'thoughtless' | ||
- 'tired' | ||
- 'tough' | ||
- 'troubled' | ||
- 'ugliest' | ||
- 'ugly' | ||
- 'uninterested' | ||
- 'unsightly' | ||
- 'upset' | ||
- 'uptight' | ||
- 'weary' | ||
- 'wicked' | ||
- 'wild' | ||
- 'worrisome' | ||
- 'worried' | ||
- 'wrong' |
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 TestFakerAdjective < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::Adjective | ||
end | ||
|
||
def test_positive | ||
assert @tester.positive.match(/\w+/) | ||
end | ||
|
||
def test_negative | ||
assert @tester.negative.match(/\w+/) | ||
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