Sha256: d301f675849defc9cd7737ecae10c7752f1483ab81343011ed1abab498b29b77

Contents?: true

Size: 767 Bytes

Versions: 11

Compression:

Stored size: 767 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

11 entries across 11 versions & 1 rubygems

Version Path
hubstats-0.3.1 spec/factories/pull_requests.rb
hubstats-0.3.0 spec/factories/pull_requests.rb
hubstats-0.2.3 spec/factories/pull_requests.rb
hubstats-0.2.2 spec/factories/pull_requests.rb
hubstats-0.2.1 spec/factories/pull_requests.rb
hubstats-0.2.0 spec/factories/pull_requests.rb
hubstats-0.1.3 spec/factories/pull_requests.rb
hubstats-0.1.2 spec/factories/pull_requests.rb
hubstats-0.1.1 spec/factories/pull_requests.rb
hubstats-0.1.0 spec/factories/pull_requests.rb
hubstats-0.0.23 spec/factories/pull_requests.rb