-
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.
Faker::Movies::GratefulDead => Faker::Music::GratefulDead (#1549)
- Loading branch information
Showing
7 changed files
with
54 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Faker::Music::GratefulDead | ||
|
||
|
||
```ruby | ||
Faker::Music::GratefulDead.player #=> "Jerry Garcia" | ||
|
||
Faker::Music::GratefulDead.song #=> "Cassidy" | ||
``` |
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,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module Faker | ||
module Movies | ||
class GratefulDead < Base | ||
class << self | ||
extend Gem::Deprecate | ||
|
||
def player | ||
Faker::Music::GratefulDead.player | ||
end | ||
|
||
def song | ||
Faker::Music::GratefulDead.song | ||
end | ||
|
||
deprecate :player, 'Faker::Music::GratefulDead.player', 2019, 04 | ||
deprecate :song, 'Faker::Music::GratefulDead.song', 2019, 04 | ||
end | ||
end | ||
end | ||
end |
4 changes: 3 additions & 1 deletion
4
lib/faker/movies/grateful_dead.rb → lib/faker/music/grateful_dead.rb
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 |
---|---|---|
|
@@ -44,4 +44,5 @@ en: | |
"The Music Never Stopped", | ||
"Black Muddy River", | ||
"Looks Like Rain", | ||
"Bird Song"] | ||
"Bird Song", | ||
"Cassidy"] |
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,17 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../../test_helper' | ||
|
||
class TestFakerGratefulDead < Test::Unit::TestCase | ||
def setup | ||
@tester = Faker::Music::GratefulDead | ||
end | ||
|
||
def test_player | ||
assert @tester.player.match(/\w/) | ||
end | ||
|
||
def test_song | ||
assert @tester.song.match(/\w/) | ||
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