Sha256: d86f15b1d94106f00f739c989c4eab632ec9dbbe5cac55371866693a73b526dd

Contents?: true

Size: 759 Bytes

Versions: 4

Compression:

Stored size: 759 Bytes

Contents

FactoryBot.define do
  factory :amount, class: Borutus::Amount do |amount|
    amount.amount { BigDecimal("473") }
    amount.association :entry, factory: :entry_with_credit_and_debit
    amount.association :account, factory: :asset
  end

  factory :credit_amount, class: Borutus::CreditAmount do |credit_amount|
    credit_amount.amount { BigDecimal("473") }
    credit_amount.association :entry, factory: :entry_with_credit_and_debit
    credit_amount.association :account, factory: :revenue
  end

  factory :debit_amount, class: Borutus::DebitAmount do |debit_amount|
    debit_amount.amount { BigDecimal("473") }
    debit_amount.association :entry, factory: :entry_with_credit_and_debit
    debit_amount.association :account, factory: :asset
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
borutus-1.0.0 spec/factories/amount_factory.rb
borutus-0.2.4 spec/factories/amount_factory.rb
borutus-0.2.3 spec/factories/amount_factory.rb
borutus-0.2.2 spec/factories/amount_factory.rb