Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add a new sports section for mountaineers #2465

Merged
merged 1 commit into from
Jun 25, 2022
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
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