Permalink
Browse files

added ability for email_address to accept the name portion of the value

  • Loading branch information...
1 parent 7d906cb commit f68ec419e6f02aa0a5d39b1f8642ff432d8f8730 @cheezy committed Dec 22, 2012
View
@@ -2,6 +2,7 @@
* Enhancements
* 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
=== Version 0.10 / 2012-12-8
* Enhancements
@@ -31,6 +31,7 @@ Feature: Functionality of the data_magic gem
Scenario: Getting an email address from the yaml
Then the value for "email" should be 1 word long
+ 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
@@ -69,3 +69,7 @@ class TestClass
value = @data[key]
value[-1 * num.to_i,num.to_i].downcase.should == value[-3,3]
end
+
+Then /^the value for "(.*?)" should include "(.*?)"$/ do |key, value|
+ @data[key].should include value
+end
@@ -16,6 +16,7 @@ dm:
second_address: ~secondary_address
company: ~company_name
email: ~email_address
+ email_plus: ~email_address('buddy')
domain_name: ~domain_name
user_name: ~user_name
phone: ~phone_number
@@ -144,8 +144,8 @@ def characters(character_count = 255)
#
# return a random email address
#
- def email_address
- Faker::Internet.email
+ def email_address(name=nil)
+ Faker::Internet.email(name)
end
#

0 comments on commit f68ec41

Please sign in to comment.