Skip to content

Commit

Permalink
Updates dessert faker (#1236)
Browse files Browse the repository at this point in the history
* Add Dessert Faker with Variety, Topping, and Flavor Options.

* Update Documentation for Dessert Faker

* Updates dessert class and tests

* Removes unneeded line

* Updated tests to fix rubocop

* Adds a few more options to the dessert yml
  • Loading branch information
susiirwin authored and vbrazo committed May 21, 2018
1 parent 0786d69 commit b6ad95f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion doc/dessert.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Faker::Dessert.topping #=> "Gummy Bears"

# Random dessert flavor
Faker::Dessert.flavor #=> "Salted Caramel"
```
```
2 changes: 1 addition & 1 deletion lib/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ en:
pm: "PM"

faker:
separator: ' & '
separator: ' & '
6 changes: 3 additions & 3 deletions lib/locales/en/dessert.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
en:
faker:
dessert:
variety: ["Cake", "Cookie", "Pie", "Ice Cream", "Pudding", "Sweet Bread", "Cupcake", "Cheesecake", "Brownie", "Cobbler", "Ice Cream Cake", "Doughnut", "Frozen Yogurt", "Parfait", "Sundae", "Trifle", "Cake Pop"]
topping: ["Rainbow Sprinkles", "Chocolate Chips", "Whipped Cream", "Frosting", "Peanut Butter", "Gummy Bears", "Mocha Drizzle", "Caramel", "Bacon", "Chocolate Syrup", "Chocolate Sprinkles", "Cookie Dough", "Peanuts", "Butterscotch Syrup", "Marshmallows", "Cheesecake Bites", "Walnuts", "Granola", "Toffee Bits", "Berry Compote"]
flavor: ["Vanilla", "Chocolate", "Strawberry", "Birthday Cake", "Salted Caramel", "Banana", "Butter Pecan", "Cookies 'n Cream", "Caramel", "Apple", "Butterscotch", "Mint Chocolate Chip", "Espresso", "Butter Pecan", "Cherry", "Coconut", "Chocolate Chip Cookie Dough", "French Vanilla", "Neapolitan", "Pistachio", "Rocky Road", "Peanut Butter", "Almond", "Green Tea", "Cheesecake", "Funfetti", "Lemon", "Oatmeal", "Pumpkin", "Red Velvet"]
variety: ["Cake", "Cookie", "Pie", "Ice Cream", "Pudding", "Sweet Bread", "Cupcake", "Cheesecake", "Brownie", "Cobbler", "Ice Cream Cake", "Doughnut", "Frozen Yogurt", "Parfait", "Sundae", "Trifle", "Cake Pop", "Fruit Cake", "Coffee Cake", "Key Lime Pie", "Upside Down Pineapple Cake"]
topping: ["Rainbow Sprinkles", "Chocolate Chips", "Whipped Cream", "Frosting", "Peanut Butter", "Gummy Bears", "Mocha Drizzle", "Caramel", "Bacon", "Chocolate Syrup", "Chocolate Sprinkles", "Cookie Dough", "Peanuts", "Butterscotch Syrup", "Marshmallows", "Cheesecake Bites", "Walnuts", "Granola", "Toffee Bits", "Berry Compote", "Glaze", "Powdered Sugar", "Cinnamon"]
flavor: ["Vanilla", "Chocolate", "Strawberry", "Birthday Cake", "Salted Caramel", "Banana", "Butter Pecan", "Cookies 'n Cream", "Caramel", "Apple", "Butterscotch", "Mint Chocolate Chip", "Espresso", "Butter Pecan", "Cherry", "Coconut", "Chocolate Chip Cookie Dough", "French Vanilla", "Neapolitan", "Pistachio", "Rocky Road", "Peanut Butter", "Almond", "Green Tea", "Cheesecake", "Funfetti", "Lemon", "Oatmeal", "Pumpkin", "Red Velvet", "Blondie"]
6 changes: 3 additions & 3 deletions test/test_faker_dessert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ def setup
end

def test_variety
assert @tester.variety.match(/\w+\.?/)
assert @tester.variety.match(/\w+/)
end

def test_topping
assert @tester.topping.match(/\w+\.?/)
assert @tester.topping.match(/\w+/)
end

def test_flavor
assert @tester.flavor.match(/\w+\.?/)
assert @tester.flavor.match(/\w+/)
end
end

0 comments on commit b6ad95f

Please sign in to comment.