-
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.
* Add Faker::Music::Rush * Update lib/faker/music/rush.rb Co-Authored-By: Connor Shea <[email protected]> * Update lib/faker/music/rush.rb Co-Authored-By: Connor Shea <[email protected]> Co-authored-by: Vitor Oliveira <[email protected]> Co-authored-by: Connor Shea <[email protected]>
- Loading branch information
1 parent
7a67bb4
commit b4f8f42
Showing
5 changed files
with
94 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
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,7 @@ | ||
# Faker::Music::Rush | ||
|
||
```ruby | ||
Faker::Music::Rush.player #=> "Neil Peart" | ||
|
||
Faker::Music::Rush.album #=> "Hold Your Fire" | ||
``` |
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,37 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'music' | ||
|
||
module Faker | ||
class Music | ||
class Rush < Base | ||
class << self | ||
## | ||
# Produces the name of a member of Rush | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Music::Rush.player #=> "Geddy Lee" | ||
# | ||
# @faker.version next | ||
def player | ||
fetch('rush.players') | ||
end | ||
|
||
## | ||
# Produces the name of an album by Rush | ||
# | ||
# @return [String] | ||
# | ||
# @example | ||
# Faker::Music::Rush.album #=> "Hold Your Fire" | ||
# | ||
# @faker.version next | ||
def album | ||
fetch('rush.albums') | ||
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,32 @@ | ||
en: | ||
faker: | ||
rush: | ||
players: | ||
- Geddy Lee | ||
- Alex Lifeson | ||
- Neil Peart | ||
- John Rutsey | ||
albums: | ||
- Rush | ||
- Fly by Night | ||
- Caress of Steel | ||
- 2112 | ||
- A Farewell to Kings | ||
- Hemispheres | ||
- Permanent Waves | ||
- Moving Pictures | ||
- Signals | ||
- Grace Under Pressure | ||
- Power Windows | ||
- Hold Your Fire | ||
- Presto | ||
- Roll the Bones | ||
- Counterparts | ||
- Test for Echo | ||
- Vapor Trails | ||
- Snakes & Arrows | ||
- Clockwork Angels | ||
- All the World's a Stage | ||
- Exit...Stage Left | ||
- A Show of Hands | ||
- Different Stages |
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 TestFakerRush < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::Music::Rush | ||
end | ||
|
||
def test_player | ||
assert @tester.player.match(/\w+/) | ||
end | ||
|
||
def test_album | ||
assert @tester.album.match(/\w+/) | ||
end | ||
end |