Sha256: b8ac2b3129ce4e5d131d80a202853480c7fdace3c6a6d404da8d6a7ae35f55a6
Contents?: true
Size: 445 Bytes
Versions: 3
Compression:
Stored size: 445 Bytes
Contents
# frozen_string_literal: true FactoryBot.define do sequence(:email) {|n| "john#{n}@doe.com" } factory :user do name { "John Doe" } email { generate(:email) } end factory :skill do user { users(:john) } end factory :preload do name { "My Preload" } end preload do factory(:john) { create(:user) } factory(:ruby) { create(:skill, user: users(:john)) } factory(:my) { create(:preload) } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
factory_bot-preload-0.2.2 | spec/support/factories.rb |
factory_bot-preload-0.2.1 | spec/support/factories.rb |
factory_bot-preload-0.2.0 | spec/support/factories.rb |