Sha256: d79c9e445cfb5e846bde70c7f4f0fef4d710ef2d77ea099d6bda5499b4ba88ed

Contents?: true

Size: 768 Bytes

Versions: 3

Compression:

Stored size: 768 Bytes

Contents

FactoryGirl.define do
  factory :pull_request, :class => Hubstats::PullRequest do
    user
    repo
    id {Faker::Number.number(6).to_i}
    number {|n| "#{n}".to_i}
  end

  factory :pull_request_hash, class:Hash do
    association :user, factory: :user_hash, strategy: :build
    association :repository, factory: :repo_hash, strategy: :build
    id {Faker::Number.number(6).to_i}
    number {|n| "#{n}".to_i}

    initialize_with { attributes } 
  end

  factory :pull_request_payload_hash, class:Hash do 
    id {Faker::Number.number(6).to_i}
    type "PullRequestEvent"
    association :repository, factory: :repo_hash, strategy: :build
    association :pull_request, factory: :pull_request_hash, strategy: :build

    initialize_with { attributes } 
  end 
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hubstats-0.3.4 spec/factories/pull_requests.rb
hubstats-0.3.3 spec/factories/pull_requests.rb
hubstats-0.3.2 spec/factories/pull_requests.rb