Sha256: 5a25a25697e0d3ed2f71ac263e128d583728e19fee23018156812e4ceaec9b61
Contents?: true
Size: 508 Bytes
Versions: 1
Compression:
Stored size: 508 Bytes
Contents
FactoryGirl.define do factory :child_resource do |u| sequence(:name) { |n| "child_resource#{n}" } association :parent_resource, :factory => :parent_resource description 'The Description' end factory :child_resource2, :parent => :child_resource do |u| sequence(:name) { |n| "child_resource_test" } parent_resource { |r| ParentResource.first(:conditions => ['name = ?', 'parent_resource_test']) || FactoryGirl.create(:parent_resource2) } description 'The Description' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alberich-0.2.0 | spec/factories/child_resource.rb |