summaryrefslogtreecommitdiff
path: root/help/test/factories.rb
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2013-01-14 11:05:52 -0800
committerazul <azul@riseup.net>2013-01-14 11:05:52 -0800
commitee2ea4ac8f4c6b0c3b09be6ed49e7a1faec7a9c1 (patch)
tree45eb6dcddd743de2b9f999d54751d9d4fc0fcbdd /help/test/factories.rb
parent4fd47160e0c43695aada330154f41821099bdda0 (diff)
parent7b323c5dbd7171cf98f69ca159b5aa2174a5d069 (diff)
Merge pull request #15 from leapcode/feature/test-data-with-faker
Test data with faker, using factory girl
Diffstat (limited to 'help/test/factories.rb')
-rw-r--r--help/test/factories.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/help/test/factories.rb b/help/test/factories.rb
new file mode 100644
index 0000000..5b38952
--- /dev/null
+++ b/help/test/factories.rb
@@ -0,0 +1,10 @@
+FactoryGirl.define do
+
+ factory :ticket do
+ title { Faker::Lorem.sentence }
+ comments_attributes do
+ { "0" => { "body" => Faker::Lorem.sentences.join(" ") } }
+ end
+ end
+
+end