Sha256: 3c88afecbcd58131d2df05396432a298cf5e77ef2fe869efdf76eeaf3a280315

Contents?: true

Size: 1.22 KB

Versions: 4

Compression:

Stored size: 1.22 KB

Contents

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

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

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rapidfire-5.0.0 spec/support/rapidfire/answer_spec_helper.rb
rapidfire-4.0.0 spec/support/rapidfire/answer_spec_helper.rb
rapidfire-3.1.0 spec/support/rapidfire/answer_spec_helper.rb
rapidfire-3.0.0 spec/support/rapidfire/answer_spec_helper.rb