Sha256: 8704fb09758cff385dc7022c4d597638f40fa0cad3fe43aa4fe05f8b77ee54a3

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

module Rapidfire
  module AnswerSpecHelper
    def create_answers
      FactoryBot.create(:answer, :question => @question_checkbox, :answer_text => 'hindi')
      FactoryBot.create(:answer, :question => @question_checkbox, :answer_text => "hindi\r\ntelugu")
      FactoryBot.create(:answer, :question => @question_checkbox, :answer_text => "hindi\r\nkannada")

      FactoryBot.create(:answer, :question => @question_select, :answer_text => 'mac')
      FactoryBot.create(:answer, :question => @question_select, :answer_text => 'mac')
      FactoryBot.create(:answer, :question => @question_select, :answer_text => 'windows')

      FactoryBot.create(:answer, :question => @question_radio, :answer_text => 'male')
      FactoryBot.create(:answer, :question => @question_radio, :answer_text => 'female')

      3.times do
        FactoryBot.create(:answer, :question => @question_date, :answer_text => Date.today.to_s)
        FactoryBot.create(:answer, :question => @question_long, :answer_text => 'my bio goes on and on!')
        FactoryBot.create(:answer, :question => @question_numeric, :answer_text => 999)
        FactoryBot.create(:answer, :question => @question_short, :answer_text => 'this is cool')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rapidfire-8.0.0 spec/support/rapidfire/answer_spec_helper.rb