Sha256: 222545dd852b992ce112ff005bb2facaaac69ce79a35ffbbb411467057092fbd

Contents?: true

Size: 449 Bytes

Versions: 2

Compression:

Stored size: 449 Bytes

Contents

# Factories
require 'factory_bot'

FactoryBot.define do
  sequence :fork_name do |n|
    "fork %d04" % n
  end

  factory :fork do |f|
    f.name { FactoryBot.generate(:fork_name) }
  end

  factory :tine do |t|
    t.association :fork
  end

  factory :rusty_tine, :class => Tine do |t|
    t.association :fork
    t.rusty true
  end

  factory :fancy_fork, :class => Fork do |t|
    t.name { "Fancy " + FactoryBot.generate(:fork_name) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pickle-0.5.5 features/app/factories.rb
pickle-0.5.4 features/app/factories.rb