Skip to content

Commit

Permalink
Faker::SouthPark => Faker::Movies::SouthPark (#1403)
Browse files Browse the repository at this point in the history
* Faker::SouthPark => Faker::Movies::SouthPark

* Update CHANGELOG.md

* Update CHANGELOG.md
  • Loading branch information
vbrazo authored Oct 12, 2018
1 parent 551642c commit 80f6f2b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- [PR #1310](https://github.com/stympy/faker/pull/1310) Add alias for middle_name and remove locale [@vbrazo](https://github.com/vbrazo)

### Chores
- [PR #1403](https://github.com/stympy/faker/pull/1403) Faker::SouthPark => Faker::Movies::SouthPark [@vbrazo](https://github.com/vbrazo)
- [PR #1401](https://github.com/stympy/faker/pull/1401) Faker::GratefulDead => Faker::Movies::GratefulDead [@vbrazo](https://github.com/vbrazo)
- [PR #1362](https://github.com/stympy/faker/pull/1362) Faker::Types minor cleanup [@stephengroat](https://github.com/stephengroat)
- [PR #1347](https://github.com/stympy/faker/pull/1347) Remove launchy dependency [@vbrazo](https://github.com/vbrazo)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ Contents
- [Faker::Movie](doc/movie.md)
- [Faker::Movies::Ghostbusters](doc/ghostbusters.md)
- [Faker::Movies::GratefulDead](doc/grateful_dead.md)
- [Faker::Movies::SouthPark](doc/south_park.md)
- [Faker::Music](doc/music.md)
- [Faker::Myst](doc/myst.md)
- [Faker::Name](doc/name.md)
Expand Down Expand Up @@ -152,7 +153,6 @@ Contents
- [Faker::SlackEmoji](doc/slack_emoji.md)
- [Faker::Source](doc/source.md)
- [Faker::SouthAfrica](doc/south_africa.md)
- [Faker::SouthPark](doc/south_park.md)
- [Faker::Space](doc/space.md)
- [Faker::StarTrek](doc/star_trek.md)
- [Faker::StarWars](doc/star_wars.md)
Expand Down
6 changes: 3 additions & 3 deletions doc/south_park.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Faker::SouthPark
# Faker::Movies::SouthPark

It might be available in the next version.

```ruby
Faker::SouthPark.character #=> "Mr. Garrison"
Faker::Movies::SouthPark.character #=> "Mr. Garrison"

Faker::SouthPark.quote #=> "I'm just getting a little cancer Stan"
Faker::Movies::SouthPark.quote #=> "I'm just getting a little cancer Stan"
```
16 changes: 9 additions & 7 deletions lib/faker/south_park.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# frozen_string_literal: true

module Faker
class SouthPark < Base
class << self
def character
fetch('south_park.characters')
end
module Movies
class SouthPark < Base
class << self
def character
fetch('south_park.characters')
end

def quote
fetch('south_park.quotes')
def quote
fetch('south_park.quotes')
end
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/test_faker_south_park.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

require_relative 'test_helper'

class TestFakerSouthPark < Test::Unit::TestCase
class TestFakerMoviesSouthPark < Test::Unit::TestCase
def setup
@tester = Faker::SouthPark
@tester = Faker::Movies::SouthPark
end

def test_character
Expand Down

0 comments on commit 80f6f2b

Please sign in to comment.