Sha256: 711220fa2e2ddd0faf621e4170c72afeec5b8e5132029fd2b86cf150fa795352

Contents?: true

Size: 284 Bytes

Versions: 38

Compression:

Stored size: 284 Bytes

Contents

FactoryGirl.define do
  factory :team do
    name { generate :string }

    trait :with_stadium do
      association :stadium
    end

    trait :with_players do
      after(:build) do |object, evaluator|
        create_list(:player, 11, :team => object)
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
synchronisable-1.0.9 spec/factories/team.rb
synchronisable-1.0.8 spec/factories/team.rb
synchronisable-1.0.7 spec/factories/team.rb
synchronisable-1.0.6 spec/factories/team.rb
synchronisable-1.0.5 spec/factories/team.rb
synchronisable-1.0.4 spec/factories/team.rb
synchronisable-1.0.3 spec/factories/team.rb
synchronisable-1.0.2 spec/factories/team.rb
synchronisable-1.0.1 spec/factories/team.rb
synchronisable-1.0.0 spec/factories/team.rb
synchronisable-0.0.9 spec/factories/team.rb
synchronisable-0.0.8 spec/factories/team.rb
synchronisable-0.0.7 spec/factories/team.rb
synchronisable-0.0.6 spec/factories/team.rb
synchronisable-0.0.5 spec/factories/team.rb
synchronisable-0.0.4 spec/factories/team.rb
synchronisable-0.0.3 spec/factories/team.rb
synchronisable-0.0.2 spec/factories/team.rb