Sha256: 5d3541280ff71427792cc374d67ebf5760c3ed92385c10de2d73196b86a6cec8

Contents?: true

Size: 784 Bytes

Versions: 2

Compression:

Stored size: 784 Bytes

Contents

FactoryGirl.define do
  factory :amount, :class => Plutus::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 => Plutus::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 => Plutus::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

2 entries across 2 versions & 1 rubygems

Version Path
plutus-0.17 spec/factories/amount_factory.rb
plutus-0.16 spec/factories/amount_factory.rb