Sha256: c636d552c2a3d7a743f7403254539840e914832cfb09632c0f0f7979e9a34ac7
Contents?: true
Size: 548 Bytes
Versions: 1
Compression:
Stored size: 548 Bytes
Contents
# Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do factory :tasks_taskables_question, aliases: [:question], class: 'Tasks::Taskables::Question' do text "MyText" multiple true factory :tasks_taskables_question_with_options, aliases: [:question_with_options] do ignore do options_count 3 end after :build do |question, evaluator| evaluator.options_count.times do |n| question.options.build text: "Option #{n}" end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tasuku-0.0.1 | spec/factories/tasks_taskables_questions.rb |