Skip to content

Commit

Permalink
Merge pull request #2465 from LeviLong01/ll/sports-mountaineering
Browse files Browse the repository at this point in the history
Add a new sports section for mountaineers
  • Loading branch information
thdaraujo authored Jun 25, 2022
2 parents b2b9352 + 7db2050 commit dd0ea55
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/sports/mountaineering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Faker::Sports::Mountaineering

```ruby
Faker::Sports::Mountaineering.mountaineer #=> "Junko Tabei"
```
22 changes: 22 additions & 0 deletions lib/faker/sports/mountaineering.rb
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
14 changes: 14 additions & 0 deletions lib/locales/en/mountaineering.yml
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
13 changes: 13 additions & 0 deletions test/faker/sports/test_faker_mountaineering.rb
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

0 comments on commit dd0ea55

Please sign in to comment.