Sha256: 9d6960a994ef0f4c006a1f4ed6d507f8880637df2f1ef230de7d95b079fce708

Contents?: true

Size: 817 Bytes

Versions: 9

Compression:

Stored size: 817 Bytes

Contents

FactoryGirl.define do
  factory :amount, :class => ESA::Amount do |amount|
    amount.amount BigDecimal.new('473')
    amount.association :transaction, :factory => :transaction_with_credit_and_debit
    amount.association :account, :factory => :asset
  end

  factory :credit_amount, :class => ESA::Amounts::Credit do |credit_amount|
    credit_amount.amount BigDecimal.new('473')
    credit_amount.association :transaction, :factory => :transaction_with_credit_and_debit
    credit_amount.association :account, :factory => :revenue
  end

  factory :debit_amount, :class => ESA::Amounts::Debit do |debit_amount|
    debit_amount.amount BigDecimal.new('473')
    debit_amount.association :transaction, :factory => :transaction_with_credit_and_debit
    debit_amount.association :account, :factory => :asset
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
event_sourced_accounting-0.2.6 spec/factories/amount_factory.rb
event_sourced_accounting-0.2.4 spec/factories/amount_factory.rb
event_sourced_accounting-0.2.3 spec/factories/amount_factory.rb
event_sourced_accounting-0.2.2 spec/factories/amount_factory.rb
event_sourced_accounting-0.1.6 spec/factories/amount_factory.rb
event_sourced_accounting-0.1.4 spec/factories/amount_factory.rb
event_sourced_accounting-0.1.3 spec/factories/amount_factory.rb
event_sourced_accounting-0.1.1 spec/factories/amount_factory.rb
event_sourced_accounting-0.1.0 spec/factories/amount_factory.rb