Permalink
Browse files

added title translator

  • Loading branch information...
1 parent cb74ced commit 26720ae667860a0906130c16c8f478f03915f4b3 @cheezy committed Dec 22, 2012
Showing with 14 additions and 1 deletion.
  1. +5 −1 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,4 +1,8 @@
-==- Version 0.10 / 2012-12-8
+=== Version 0.11
+* Enhancements
+ * Added title translator
+
+=== Version 0.10 / 2012-12-8
* Enhancements
* Added randomize translator to return random selection from Array or Range
* Added mask translator which accepts a mask. Will replace # with number, A with upper case letter, and a with lower case letter
@@ -14,6 +14,7 @@ Feature: Functionality of the data_magic gem
And the value for "last_name" should be 1 word long
And the value for "name_prefix" should be 1 word long
And the value for "name_suffix" should be 1 word long
+ And the value for "title" should have a minimum of 3 words
Scenario: Getting addresses from the yaml
Then the value for "street" should have a minimum of 2 words
@@ -29,6 +29,7 @@ dm:
random: ~randomize ['Tom', 'Dick', 'Harry']
range: ~randomize 1..5
mask: ~mask "###-AAA_aaa"
+ title: ~title
other:
name: Cheezy
@@ -36,6 +36,13 @@ def name_suffix
end
#
+ # return a random title
+ #
+ def title
+ Faker::Name.title
+ end
+
+ #
# return a random street address
#
def street_address

0 comments on commit 26720ae

Please sign in to comment.