Browse files

added ability for street_address to also include secondary address

  • Loading branch information...
1 parent 26720ae commit 7d906cb0a1ec76cc87c6d0055bf53cf231ebef08 @cheezy committed Dec 22, 2012
Showing with 5 additions and 2 deletions.
  1. +1 −0 ChangeLog
  2. +1 −0 features/data_magic.feature
  3. +1 −0 features/yaml/example.yml
  4. +2 −2 lib/data_magic/translation.rb
View
1 ChangeLog
@@ -1,6 +1,7 @@
=== Version 0.11
* Enhancements
* Added title translator
+ * Added ability for street_address translator to also include secondary address
=== Version 0.10 / 2012-12-8
* Enhancements
View
1 features/data_magic.feature
@@ -18,6 +18,7 @@ Feature: Functionality of the data_magic gem
Scenario: Getting addresses from the yaml
Then the value for "street" should have a minimum of 2 words
+ And the value for "street_plus" should have a minimum of 4 words
And the value for "city" should have a minimum of 1 word
And the value for "state" should have a minimum of 1 word
And the value for "state_ab" should be 1 word long
View
1 features/yaml/example.yml
@@ -7,6 +7,7 @@ dm:
name_prefix: ~name_prefix
name_suffix: ~name_suffix
street: ~street_address
+ street_plus: ~street_address(true)
city: ~city
state: ~state
state_ab: ~state_abbr
View
4 lib/data_magic/translation.rb
@@ -45,8 +45,8 @@ def title
#
# return a random street address
#
- def street_address
- Faker::Address.street_address
+ def street_address(include_secondary=false)
+ Faker::Address.street_address(include_secondary)
end
#

0 comments on commit 7d906cb

Please sign in to comment.