Sha256: 248f735dfc89c44cf356f5106f9f0f1097a180b0d044a3e7cb9b1b98bdcf611a
Contents?: true
Size: 513 Bytes
Versions: 1
Compression:
Stored size: 513 Bytes
Contents
# frozen_string_literal: true require 'factory_bot' FactoryBot.define do factory :parent_document do trait :with_documents do after(:create) do |parent, _evaluator| 3.times { FactoryBot.create(:document, parent_document: parent) } end end end factory :document do trait :with_embedded_docs do after(:create) do |parent, _evaluator| 3.times { FactoryBot.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-1.0.1 | spec/support/factories.rb |