Sha256: 52a6df61126a17b6de45639396b6ad6bc9fe4f30266cef9e3c555d2f12548776

Contents?: true

Size: 1.36 KB

Versions: 13

Compression:

Stored size: 1.36 KB

Contents

FactoryBot.define do
  factory :element, class: Fe::Element do
    sequence    :label do |n| "Label Element #{n}" end
    required    { true }

    factory :choice_field_element, class: Fe::ChoiceField do
      kind    { "Fe::ChoiceField" }
      style   { "yes-no" }
      content { "Choice One\r\nChoice Two\r\nChoice Three" }
    end
    factory :date_field_element, class: Fe::DateField do
      kind    { "Fe::DateField" }
      style   { "date" }
    end
    factory :text_field_element, class: Fe::TextField do
      kind   { "Fe::TextField" }
      style  { "short" }
    end
    factory :question_grid, class: Fe::QuestionGrid do
      kind   { "Fe::QuestionGrid" }
      style  { "grid" }
    end
    factory :question_grid_with_total, class: Fe::QuestionGridWithTotal do
      kind   { "Fe::QuestionGridWithTotal" }
      style  { "grid" }
    end
    factory :reference_element, class: Fe::ReferenceQuestion do
      kind   { "Fe::ReferenceQuestion" }
      style  { "staff" }
    end
    factory :section, class: Fe::Section do
      kind   { "Fe::Section" }
      style  { "section" }
    end
    factory :attachment_field_element, class: Fe::AttachmentField do
      kind   { "Fe::AttachmentField" }
      style  { "section" }
    end
    factory :state_chooser_element, class: Fe::StateChooser do
      kind   { "Fe::StateChooser" }
      style  { "section" }
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fe-2.1.5 spec/factories/elements.rb
fe-2.1.4 spec/factories/elements.rb
fe-2.1.3 spec/factories/elements.rb
fe-2.1.2 spec/factories/elements.rb
fe-2.1.1 spec/factories/elements.rb
fe-2.0.8 spec/factories/elements.rb
fe-2.0.6 spec/factories/elements.rb
fe-2.0.5 spec/factories/elements.rb
fe-2.0.4 spec/factories/elements.rb
fe-2.0.3 spec/factories/elements.rb
fe-2.0.2 spec/factories/elements.rb
fe-2.0.1 spec/factories/elements.rb
fe-2.0.0 spec/factories/elements.rb