Sha256: 38f4a9c6c8caf89658120647fafac56bd4f7ad00eb968c50ee51273e36ff0502

Contents?: true

Size: 384 Bytes

Versions: 1

Compression:

Stored size: 384 Bytes

Contents

FactoryGirl.define do
  factory :question_sheet, class: Fe::QuestionSheet do
    sequence(:label) { |n| "Question Sheet #{n}"}

    factory :question_sheet_with_pages do
      transient do
        pages_count 5
      end

      after(:create) do |question_sheet, evaluator|
        create_list(:page, evaluator.pages_count, question_sheet: question_sheet)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fe-1.0.0 spec/factories/question_sheet.rb