journalduhacker/spec/support/blueprints.rb

21 lines
419 B
Ruby
Raw Normal View History

require 'machinist/active_record'
User.blueprint do
email { "user-#{sn}@example.com" }
password { "blah blah" }
password_confirmation { object.password }
2012-07-01 00:41:14 +02:00
username { "username#{sn}" }
end
Story.blueprint do
user_id { User.make }
title { "story title #{sn}" }
url { "http://example.com/#{sn}" }
2012-07-01 01:00:05 +02:00
tags_a { [ "tag1", "tag2" ] }
2012-07-01 00:41:14 +02:00
end
Tag.blueprint do
tag { "tag-#{sn}" }
description { "tag #{sn}" }
end