Sha256: 519cec21d91e5965d048fbb8e9505bea176d68b287f43fcd96f6b1cf5c7aff35

Contents?: true

Size: 674 Bytes

Versions: 4

Compression:

Stored size: 674 Bytes

Contents

FactoryGirl.define do
  factory :tasuku_task, aliases: [:task], class: 'Tasuku::Task' do
    association :taskable, factory: :verification

    trait(:with_verification)     { association :taskable, factory: :verification }
    trait(:with_image_task)       { association :taskable, factory: :image_request }
    trait(:with_question_task)    { association :taskable, factory: :tasuku_taskables_question_with_options }
    trait(:with_text_task)        { association :taskable, factory: :text_request }

    factory :image_task, traits: [:with_image_task]
    factory :question_task, traits: [:with_question_task]
    factory :text_task, traits: [:with_text_task]
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tasuku-1.1.0 spec/factories/tasuku_tasks.rb
tasuku-1.0.1 spec/factories/tasuku_tasks.rb
tasuku-0.1.1 spec/factories/tasuku_tasks.rb
tasuku-0.1.0 spec/factories/tasuku_tasks.rb