Sha256: a8efa046ec1417af8786134c25744f1bf935d01d72ca953f8fc591860941f74c

Contents?: true

Size: 408 Bytes

Versions: 13

Compression:

Stored size: 408 Bytes

Contents

FactoryGirl.define do
  factory :person do
    sequence(:name) {|n| "Person #{n}" }
    before(:create) {|obj|
      user = FactoryGirl.create(:user)
      obj.apply_depositor_metadata(user.user_key)
    }
  end
  factory :person_with_user, class: Person do
    initialize_with {
      user = FactoryGirl.build(:user)
      account = Account.new(user)
      account.save
      account.person
    }
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curate-0.6.6 spec/factories/person.rb
curate-0.6.5 spec/factories/person.rb
curate-0.6.4 spec/factories/person.rb
curate-0.6.3 spec/factories/person.rb
curate-0.6.1 spec/factories/person.rb
curate-0.6.0 spec/factories/person.rb
curate-0.5.6 spec/factories/person.rb
curate-0.5.5 spec/factories/person.rb
curate-0.5.4 spec/factories/person.rb
curate-0.5.2 spec/factories/person.rb
curate-0.5.1 spec/factories/person.rb
curate-0.5.0 spec/factories/person.rb
curate-0.4.2 spec/factories/person.rb