Skip to content

Commit

Permalink
Add Faker::DrWho.actor (#1272)
Browse files Browse the repository at this point in the history
* Added Symbols for Elements to Science

* Update CHANGELOG.md

* Added actors to Dr Who

* Update changelog
  • Loading branch information
timcustard authored and vbrazo committed Jun 3, 2018
1 parent f776994 commit d51919c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
### Latest update: 2018-06-02

### Feature Request
- [PR #1272](https://github.com/stympy/faker/pull/1272) Add Faker::DrWho.actor [@timcustard](https://github.com/timcustard)
- [PR #1270](https://github.com/stympy/faker/pull/1270) Add Faker::Name.middle_name [@vbrazo](https://github.com/vbrazo)
- [PR #1266](https://github.com/stympy/faker/pull/1266) Add Faker::Science.element_symbol [@timcustard](https://github.com/timcustard)
- [PR #1101](https://github.com/stympy/faker/pull/1101) Add Faker::Company.czech_organisation_number [@jindrichskupa](https://github.com/jindrichskupa)
Expand Down
2 changes: 2 additions & 0 deletions doc/dr_who.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Faker::DrWho.character #=> "Captain Jack Harness"

Faker::DrWho.the_doctor #=> "Ninth Doctor"

Faker::DrWho.actor #=> "Matt Smith"

Faker::DrWho.catch_phrase #=> "Fantastic!"

Faker::DrWho.quote #=> "Lots of planets have a north!"
Expand Down
4 changes: 4 additions & 0 deletions lib/faker/dr_who.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ def self.the_doctor
fetch('dr_who.the_doctors')
end

def self.actor
fetch('dr_who.actors')
end

def self.catch_phrase
fetch('dr_who.catch_phrases')
end
Expand Down
6 changes: 5 additions & 1 deletion lib/locales/en/dr_who.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ en:
"Adelaide Brooke", "Wilfred Mott", "Amy Pond" ]
the_doctors: [
"First Doctor", "Second Doctor", "Third Doctor", "Fourth Doctor", "Fifth Doctor", "Sixth Doctor", "Seventh Doctor",
"Eighth Doctor", "Ninth Doctor", "Tenth Doctor", "Eleventh Doctor", "Twelfth Doctor"
"Eighth Doctor", "Ninth Doctor", "Tenth Doctor", "Eleventh Doctor", "Twelfth Doctor", "Thirteenth Doctor"
]
actors: [
"William Hartnell", "Patrick Troughton", "Jon Pertwee", "Tom Baker", "Peter Davison", "Colin Baker", "Sylvester McCoy",
"Paul McGann", "Christopher Eccleston", "David Tennant", "Matt Smith", "Peter Capaldi", "Jodie Whittaker"
]
catch_phrases: [
"Fantastic!", "I’m sorry. I’m so sorry.", "Bow ties are cool.", "Mmm I wonder ... Aha!",
Expand Down
4 changes: 4 additions & 0 deletions test/test_faker_dr_who.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ def test_the_doctor
10.times { assert Faker::DrWho.the_doctor.match(/[\w]+/) }
end

def test_actor
10.times { assert Faker::DrWho.actor.match(/[\w]+/) }
end

def test_catch_phrase
10.times { assert Faker::DrWho.catch_phrase.match(/[\w]+/) }
end
Expand Down

0 comments on commit d51919c

Please sign in to comment.