Sha256: 1e5952acbdff69044760e9e8461b41c9b202c72f2de9dae33cf57d28c45a1c80

Contents?: true

Size: 450 Bytes

Versions: 1

Compression:

Stored size: 450 Bytes

Contents

require 'factory_girl'

FactoryGirl.define do
	factory :parent_document do
		trait :with_documents do
			after(:create) do |parent, evaluator|
				3.times { FactoryGirl.create(:document, parent_document: parent) }
			end
		end
	end

	factory :document do
		trait :with_embedded_docs do
			after(:create) do |parent, evaluator|
				3.times { FactoryGirl.create(:embedded_document, document: parent) }
			end
		end
	end

	factory :embedded_document
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongoid-sortable-0.0.1 spec/support/factories.rb