Skip to content
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'main
- [Faker::Beer](doc/default/beer.md)
- [Faker::Blood](doc/default/blood.md)
- [Faker::Boolean](doc/default/boolean.md)
- [Faker::BossaNova](doc/default/bossa_nova.md)
- [Faker::Business](doc/default/business.md)
- [Faker::Camera](doc/default/camera.md)
- [Faker::Cannabis](doc/default/cannabis.md)
Expand Down Expand Up @@ -420,6 +419,7 @@ gem 'faker', :git => 'https://github.com/faker-ruby/faker.git', :branch => 'main
- [Faker::Music::Rush](doc/music/rush.md)
- [Faker::Music::SmashingPumpkins](doc/music/smashing_pumpkins.md)
- [Faker::Music::UmphreysMcgee](doc/music/umphreys_mcgee.md)
- [Faker::Music::BossaNova](doc/music/bossa_nova.md)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎼

</details>

<details>
Expand Down
7 changes: 0 additions & 7 deletions doc/default/bossa_nova.md

This file was deleted.

7 changes: 7 additions & 0 deletions doc/music/bossa_nova.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Faker::Music::BossaNova

```ruby
Faker::Music::BossaNova.artist #=> "Tom Jobim"

Faker::Music::BossaNova.song #=> "Chega de Saudade"
```
33 changes: 0 additions & 33 deletions lib/faker/default/bossa_nova.rb

This file was deleted.

41 changes: 41 additions & 0 deletions lib/faker/music/bossa_nova.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# frozen_string_literal: true

require_relative 'music'

module Faker
class Music
class BossaNova < Base
class << self
##
# Produces the name of a bossa nova artist.
#
# @return [String]
#
# @example
# Faker::Music::BossaNova.artist #=> "Tom Jobin"
#
# @faker.version 1.8.3
def artist
fetch('bossa_nova.artists')
end

##
# Produces a bossa nova song.
#
# @return [String]
#
# @example
# Faker::Music::BossaNova.song #=> "Chega de Saudade"
#
# @faker.version 1.8.3
def song
fetch('bossa_nova.songs')
end
end
end
end

include Faker::Deprecator

deprecate_generator('BossaNova', Music::BossaNova)
end
17 changes: 0 additions & 17 deletions test/faker/default/test_faker_bossa_nova.rb

This file was deleted.

30 changes: 30 additions & 0 deletions test/faker/music/test_faker_bossa_nova.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# frozen_string_literal: true

require_relative '../../test_helper'

class TestFakerBossaNova < Test::Unit::TestCase
def setup
@tester = Faker::Music::BossaNova
end

def test_artists
assert_match(/\w+/, @tester.artist)
end

def test_songs
assert_match(/\w+/, @tester.song)
end

def test_deprecation
assert_deprecated do
Faker::BossaNova.artist
end

assert_deprecated do
Faker::BossaNova.song
end

assert_match(/\w+/, Faker::BossaNova.artist)
assert_match(/\w+/, Faker::BossaNova.song)
end
end