Created
August 8, 2012 19:29
Revisions
-
Ax Suul revised this gist
Aug 8, 2012 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,11 +20,11 @@ factory :valid_neutral_account_with_production_record, parent: :valid_neutral_account do association :account, factory: :account after(:create) do |account| FactoryGirl.modify do factory :account, class: FinancialAccounting::Account do account_identifier { account.account_identifier # TRYING TO RELATE THIS TO THE account_identifier generated above } account_number { account.account_number } end end end -
John Gerhardt revised this gist
Aug 8, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ after(:create) do FactoryGirl.modify do factory :account, class: FinancialAccounting::Account do account_identifier { account_identifier # TRYING TO RELATE THIS TO THE account_identifier generated above } account_number { account_number } end end -
John Gerhardt renamed this gist
Aug 8, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
John Gerhardt created this gist
Aug 8, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ FactoryGirl.define do factory :neutral_account, class: FinancialAccounting::Update::Neutral::Account do load_sequence { FactoryGirl.generate(:sn) } loaded_at { Time.now } recorded_at { Time.now } created_at { Time.now } updated_at { Time.now } factory :valid_neutral_account do association :custodian, factory: :custodian association :advisory_firm, factory: :advisory_firm #association :account, factory: :account, strategy: :build account_number { Faker::Financial.random_string(9) } account_identifier { "#{Platform::Custodian.find(custodian).code}-#{account_number}" } advisory_firm_number { Faker::Financial.random_string(3) } advisory_firm_identifier { Platform::AdvisoryFirmIdentifier.lookup_advisory_firm_identifier(custodian_id, advisory_firm_number) } date_opened { Time.now } end factory :valid_neutral_account_with_production_record, parent: :valid_neutral_account do association :account, factory: :account after(:create) do FactoryGirl.modify do factory :account, class: FinancialAccounting::Account do account_identifier { account_identifier } account_number { account_number } end end end end end factory :invalid_neutral_account, class: FinancialAccounting::Update::Neutral::Account do load_sequence nil end end