Sha256: a0f7c6fe67860c6a5bdbfcf7cc8e8852695e5710477236eceb9c263b399527c8

Contents?: true

Size: 1.18 KB

Versions: 9

Compression:

Stored size: 1.18 KB

Contents

FactoryGirl.define do
  factory :account, :class => ESA::Account do |account|
    account.code
    account.name
    account.contra false
    account.association :chart, :factory => :chart
  end

  factory :asset, :class => ESA::Accounts::Asset do |account|
    account.code
    account.name
    account.contra false
    account.association :chart, :factory => :chart
  end

  factory :equity, :class => ESA::Accounts::Equity do |account|
    account.code
    account.name
    account.contra false
    account.association :chart, :factory => :chart
  end

  factory :expense, :class => ESA::Accounts::Expense do |account|
    account.code
    account.name
    account.contra false
    account.association :chart, :factory => :chart
  end

  factory :liability, :class => ESA::Accounts::Liability do |account|
    account.code
    account.name
    account.contra false
    account.association :chart, :factory => :chart
  end

  factory :revenue, :class => ESA::Accounts::Revenue do |account|
    account.code
    account.name
    account.contra false
    account.association :chart, :factory => :chart
  end

  sequence :name do |n|
    "Factory Name #{n}"
  end

  sequence :code do |n|
    "#{n}"
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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