-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2465 from LeviLong01/ll/sports-mountaineering
Add a new sports section for mountaineers
- Loading branch information
Showing
4 changed files
with
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Faker::Sports::Mountaineering | ||
|
||
```ruby | ||
Faker::Sports::Mountaineering.mountaineer #=> "Junko Tabei" | ||
``` |
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,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module Faker | ||
class Sports | ||
class Mountaineering < Base | ||
class << self | ||
## | ||
# Produces the name of a Mountaineer. | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Sports::Mountaineering.mountaineer #=> "Junko Tabei" | ||
# | ||
# @faker.version next | ||
def mountaineer | ||
fetch('mountaineering.mountaineer') | ||
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,14 @@ | ||
en: | ||
faker: | ||
mountaineering: | ||
mountaineer: | ||
- Junko Tabei | ||
- Catherine Destivelle | ||
- Sasha DiGiulian | ||
- Priti Wright | ||
- Caroline Gleich | ||
- Conrad Anker | ||
- Edmund Hillary | ||
- George Mallory | ||
- Steve House | ||
- Fred Beckey |
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,13 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../../test_helper' | ||
|
||
class TestFakerMountaineering < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::Sports::Mountaineering | ||
end | ||
|
||
def test_mountaineer | ||
assert @tester.mountaineer.match(/\w+/) | ||
end | ||
end |