Sha256: a45ba63c252b958447c6e581b9f01ba13a5e1b05918a19f3a6b60d175ff1cb6b

Contents?: true

Size: 774 Bytes

Versions: 24

Compression:

Stored size: 774 Bytes

Contents

# Generates fake team data we can use to test with
FactoryGirl.define do
  factory :team, :class => Hubstats::Team do
    name "Team One"
    hubstats true
  end

  factory :team_false, :class => Hubstats::Team do
    name "Team One"
    hubstats false
  end

  factory :team_hash, class:Hash do
    association :user, factory: :user_hash, strategy: :build
    id {Faker::Number.number(6).to_i}
    name "Team One"
    hubstats true
    action "added"
    initialize_with { attributes } 
  end

  factory :team_payload_hash, class:Hash do 
    id {Faker::Number.number(6).to_i}
    type "MembershipEvent"
    association :user, factory: :user_hash, strategy: :build
    association :team, factory: :team_hash, strategy: :build
    initialize_with { attributes } 
  end 
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
hubstats-0.7.2 spec/factories/teams.rb
hubstats-0.7.1 spec/factories/teams.rb
hubstats-0.7.0 spec/factories/teams.rb
hubstats-0.6.0 spec/factories/teams.rb