Skip to content

Commit 6859248

Browse files
authored
Update sport docs (#2716)
* Rename doc file to match implementation file * Use the right class name in sports doc * Rename test file to match implementation
1 parent 8f67b90 commit 6859248

File tree

3 files changed

+42
-42
lines changed

3 files changed

+42
-42
lines changed

doc/sports/sport.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Faker::Sport
2+
3+
## Conventional (Olympic including Paralympic) Sports
4+
5+
```ruby
6+
# Any one of the below four categories:
7+
Faker::Sport.sport #=> "Snowboard"
8+
9+
Faker::Sport.summer_olympics_sport #=> "Triathlon"
10+
11+
Faker::Sport.winter_olympics_sport #=> "Luge"
12+
13+
Faker::Sport.summer_paralympics_sport #=> "Goalball"
14+
15+
Faker::Sport.winter_paralympics_sport #=> "Wheelchair curling"
16+
```
17+
18+
## Ancient Sports
19+
20+
```ruby
21+
Faker::Sport.ancient_olympics_sport #=> "Chariot racing"
22+
23+
# Any modern or ancient olympic sport:
24+
Faker::Sport.sport(include_ancient: true) #=> "Rugby"
25+
```
26+
27+
## Unusual Sports (just for fun)
28+
29+
```ruby
30+
Faker::Sport.unusual_sport #=> "Camel wrestling"
31+
32+
# Any modern olympic or unusual sport:
33+
Faker::Sport.sport(include_unusual: true) #=> "Gurning"
34+
```
35+
36+
## Full list
37+
38+
```ruby
39+
# Modern, ancient or unusual:
40+
Faker::Sport.sport(include_ancient: true, include_unusual: true) #=> "Powerlifting"
41+
```

doc/sports/sports.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

test/faker/sports/test_faker_sports.rb renamed to test/faker/sports/test_faker_sport.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require_relative '../../test_helper'
44

5-
class TestFakerSports < Test::Unit::TestCase
5+
class TestFakerSport < Test::Unit::TestCase
66
def setup
77
@tester = Faker::Sport
88
end

0 commit comments

Comments
 (0)