Sha256: 18bd2bee58889ae401d541f1ec0de5d96505f43821eccdf7f3f6b55459464e67

Contents?: true

Size: 633 Bytes

Versions: 4

Compression:

Stored size: 633 Bytes

Contents

# Generates fake repo data we can use to test with
FactoryGirl.define do
  factory :repo, :class => Hubstats::Repo do
    id 101010
    name "hubstats"
    full_name "hub/hubstats"
    created_at '2015-05-30'
  end

  factory :repo_hash, class:Hash do
    id 101010
    name "Hubstats"
    full_name "hub/hubstats"
    initialize_with { attributes }
  end

  factory :repo_payload_hash, class:Hash do
    id {Faker::Number.number(6).to_i}
    type "RepositoryEvent"
    association :user, factory: :user_hash, strategy: :build
    association :repo, factory: :repo_hash, strategy: :build
    initialize_with { attributes }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hubstats-1.2.1 spec/factories/repo.rb
hubstats-1.2.0 spec/factories/repo.rb
hubstats-1.1.0 spec/factories/repo.rb
hubstats-1.0.0 spec/factories/repo.rb