Sha256: f6cb040d4fe093f18b991a7f10274431ee1b8d075e37450a4b7e7a98f4f1c022

Contents?: true

Size: 411 Bytes

Versions: 3

Compression:

Stored size: 411 Bytes

Contents

FactoryGirl.define do
  factory :entry, :class => Borutus::Entry do |entry|
    entry.description 'factory description'
    factory :entry_with_credit_and_debit, :class => Borutus::Entry do |entry_cd|
      entry_cd.after_build do |t|
        t.credit_amounts << FactoryGirl.build(:credit_amount, :entry => t)
        t.debit_amounts << FactoryGirl.build(:debit_amount, :entry => t)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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