Permalink
Browse files

added url translator

  • Loading branch information...
1 parent f68ec41 commit 5a7b495972c2da2bcd96d12fc42f2e7deddf17a8 @cheezy committed Dec 22, 2012
Showing with 10 additions and 0 deletions.
  1. +1 −0 ChangeLog
  2. +1 −0 features/data_magic.feature
  3. +1 −0 features/yaml/example.yml
  4. +7 −0 lib/data_magic/translation.rb
View
1 ChangeLog
@@ -3,6 +3,7 @@
* Added title translator
* Added ability for street_address translator to also include secondary address
* Added ability for email_address to accept the name portion of the value
+ * Added url translator
=== Version 0.10 / 2012-12-8
* Enhancements
View
1 features/data_magic.feature
@@ -34,6 +34,7 @@ Feature: Functionality of the data_magic gem
And the value for "email_plus" should include "buddy"
And the value for "domain_name" should be 1 word long
And the value for "user_name" should be 1 word long
+ And the value for "url" should include "http://"
Scenario: Getting a phone number
Then the value for "phone" should have a minimum of 1 word
View
1 features/yaml/example.yml
@@ -18,6 +18,7 @@ dm:
email: ~email_address
email_plus: ~email_address('buddy')
domain_name: ~domain_name
+ url: ~url
user_name: ~user_name
phone: ~phone_number
catch_phrase: ~catch_phrase
View
7 lib/data_magic/translation.rb
@@ -156,6 +156,13 @@ def domain_name
end
#
+ # return a random url
+ #
+ def url
+ Faker::Internet.url
+ end
+
+ #
# return a random user name
#
def user_name

0 comments on commit 5a7b495

Please sign in to comment.