Sha256: 43d29919251660f1d1f52bec31d77f1ce11aa710b2ddd9df5c3c600303b0f5a8

Contents?: true

Size: 330 Bytes

Versions: 1

Compression:

Stored size: 330 Bytes

Contents

FactoryBot.define do
  factory :expense_gun_expense, class: ::Dorsale::ExpenseGun::Expense do
    name { Faker::Lorem.sentence(word_count: 3) }
    date { Date.current }
    user { create(:user) }

    after(:create) { |expense|
      rand(2..5).times {
        create(:expense_gun_expense_line, expense:)
      }
    }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dorsale-4.0.0 spec/factories/expense_gun_expenses.rb