Skip to content

Commit

Permalink
Add Faker::Music::Rush (#1912)
Browse files Browse the repository at this point in the history
* 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
3 people authored Jun 10, 2020
1 parent 7a67bb4 commit b4f8f42
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'mast
- [Faker::Music::Phish](doc/music/phish.md)
- [Faker::Music::Prince](doc/music/prince.md)
- [Faker::Music::RockBand](doc/music/rock_band.md)
- [Faker::Music::Rush](doc/music/rush.md)
- [Faker::Music::UmphreysMcgee](doc/music/umphreys_mcgee.md)

### Quotes
Expand Down
7 changes: 7 additions & 0 deletions doc/music/rush.md
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"
```
37 changes: 37 additions & 0 deletions lib/faker/music/rush.rb
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
32 changes: 32 additions & 0 deletions lib/locales/en/rush.yml
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
17 changes: 17 additions & 0 deletions test/faker/music/test_faker_rush.rb
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

0 comments on commit b4f8f42

Please sign in to comment.