Sha256: 6548020841a501a6be2f3564ad588ae4a160a6625bb58e66abc4287217a6069e

Contents?: true

Size: 787 Bytes

Versions: 3

Compression:

Stored size: 787 Bytes

Contents

FactoryGirl.define do
  factory :amount, :class => Borutus::Amount do |amount|
    amount.amount BigDecimal.new('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.new('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.new('473')
    debit_amount.association :entry, :factory => :entry_with_credit_and_debit
    debit_amount.association :account, :factory => :asset
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
borutus-0.2.1 spec/factories/amount_factory.rb
borutus-0.2.0 spec/factories/amount_factory.rb
borutus-0.1.0 spec/factories/amount_factory.rb