Skip to content

Commit

Permalink
Add Faker::SiliconValley.email
Browse files Browse the repository at this point in the history
Closes #895
  • Loading branch information
RomainMorlevat authored and stympy committed Dec 25, 2017
1 parent ef93cec commit 10e03b1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/silicon_valley.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ Faker::SiliconValley.invention # => "Tres Comas Tequila"
Faker::SiliconValley.motto # => "Our products are products, producing unrivaled results"

Faker::SiliconValley.url # => "http://www.piedpiper.com"

Faker::SiliconValley.email #=> "[email protected]"
```
4 changes: 4 additions & 0 deletions lib/faker/silicon_valley.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ def motto
def url
fetch('silicon_valley.urls')
end

def email
fetch('silicon_valley.email')
end
end
end
end
1 change: 1 addition & 0 deletions lib/locales/en/silicon_valley.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ en:
"http://endframesystems.com",
"http://drinkhomicide.com"
]
email: ['[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]']
4 changes: 4 additions & 0 deletions test/test_faker_silicon_valley.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ def test_mottos
def test_urls
assert @tester.url.match(/\w+/)
end

def test_email
assert @tester.email.match(/\w+/)
end
end

0 comments on commit 10e03b1

Please sign in to comment.