rapidfire 4.0.0 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +120 -96
  3. data/app/assets/config/manifest.js +3 -0
  4. data/app/controllers/rapidfire/application_controller.rb +6 -2
  5. data/app/controllers/rapidfire/attempts_controller.rb +2 -2
  6. data/app/controllers/rapidfire/questions_controller.rb +1 -1
  7. data/app/controllers/rapidfire/surveys_controller.rb +30 -13
  8. data/app/helpers/rapidfire/application_helper.rb +25 -0
  9. data/app/models/rapidfire/answer.rb +6 -1
  10. data/app/models/rapidfire/attempt.rb +1 -1
  11. data/app/models/rapidfire/question.rb +34 -4
  12. data/app/models/rapidfire/questions/checkbox.rb +1 -1
  13. data/app/models/rapidfire/questions/file.rb +6 -0
  14. data/app/models/rapidfire/questions/information.rb +6 -0
  15. data/app/models/rapidfire/questions/multi_file.rb +6 -0
  16. data/app/models/rapidfire/survey.rb +42 -2
  17. data/app/services/rapidfire/attempt_builder.rb +14 -1
  18. data/app/services/rapidfire/question_form.rb +5 -1
  19. data/app/services/rapidfire/survey_results.rb +38 -4
  20. data/app/views/rapidfire/answers/_checkbox.html.erb +1 -1
  21. data/app/views/rapidfire/answers/_date.html.erb +1 -1
  22. data/app/views/rapidfire/answers/_file.html.erb +5 -0
  23. data/app/views/rapidfire/answers/_information.html.erb +4 -0
  24. data/app/views/rapidfire/answers/_long.html.erb +1 -1
  25. data/app/views/rapidfire/answers/_multifile.html.erb +5 -0
  26. data/app/views/rapidfire/answers/_numeric.html.erb +1 -1
  27. data/app/views/rapidfire/answers/_radio.html.erb +1 -1
  28. data/app/views/rapidfire/answers/_select.html.erb +1 -1
  29. data/app/views/rapidfire/answers/_short.html.erb +1 -1
  30. data/app/views/rapidfire/attempts/_form.html.erb +9 -1
  31. data/app/views/rapidfire/attempts/edit.html.erb +1 -1
  32. data/app/views/rapidfire/attempts/new.html.erb +1 -1
  33. data/app/views/rapidfire/questions/_form.html.erb +1 -1
  34. data/app/views/rapidfire/surveys/_survey.html.erb +6 -0
  35. data/app/views/rapidfire/surveys/index.html.erb +7 -2
  36. data/app/views/rapidfire/surveys/results.html.erb +3 -1
  37. data/db/migrate/20190701274749_add_active_to_surveys.rb +12 -0
  38. data/lib/generators/rapidfire/active_survey_migration_generator.rb +18 -0
  39. data/lib/generators/rapidfire/templates/migrations/add_active_to_survey.rb +5 -0
  40. data/lib/rapidfire/version.rb +1 -1
  41. data/lib/tasks/change_delimiter_to_srsn.rake +1 -1
  42. data/lib/tasks/rapidfire.rake +10 -0
  43. data/spec/controllers/rapidfire/attempts_controller_spec.rb +1 -1
  44. data/spec/dummy/README.rdoc +1 -1
  45. data/spec/dummy/app/assets/config/mainfest.js +2 -0
  46. data/spec/dummy/app/models/application_record.rb +3 -0
  47. data/spec/dummy/app/models/user.rb +2 -0
  48. data/spec/dummy/app/views/layouts/application.html.erb +0 -2
  49. data/spec/dummy/config/application.rb +22 -3
  50. data/spec/dummy/config/environments/development.rb +1 -1
  51. data/spec/dummy/config/environments/test.rb +5 -0
  52. data/spec/dummy/config/storage.yml +7 -0
  53. data/spec/dummy/db/development.sqlite3 +0 -0
  54. data/spec/dummy/db/migrate/20170701191422_create_users.rb +15 -0
  55. data/spec/dummy/db/migrate/20230402174122_create_active_storage_tables.active_storage.rb +67 -0
  56. data/spec/dummy/db/schema.rb +51 -17
  57. data/spec/dummy/db/test.sqlite3 +0 -0
  58. data/spec/dummy/log/development.log +90 -200
  59. data/spec/dummy/log/test.log +12744 -14006
  60. data/spec/dummy/tmp/storage--ruby-3.3.5/81/2n/812ne4iy4c40lvvdigsg8z02b1v1 +1 -0
  61. data/spec/dummy/tmp/storage--ruby-3.3.5/85/bs/85bsmaecej0491dey4t9jpci9yw3 +1 -0
  62. data/spec/dummy/tmp/storage--ruby-3.3.5/8y/7b/8y7bhqwxh5cad8xau7nfhtukxcsc +1 -0
  63. data/spec/dummy/tmp/storage--ruby-3.3.5/93/z6/93z6nje4f921vgdwa3lkuf49xocr +1 -0
  64. data/spec/dummy/tmp/storage--ruby-3.3.5/at/qk/atqksrev4s0ic4srii57aspu4o6z +1 -0
  65. data/spec/dummy/tmp/storage--ruby-3.3.5/bi/j3/bij3puzjsfm39colnpqstpu6ggv7 +1 -0
  66. data/spec/dummy/tmp/storage--ruby-3.3.5/cx/4p/cx4pp9ugdv2xndwll28mo8jhjgig +1 -0
  67. data/spec/dummy/tmp/storage--ruby-3.3.5/gv/9c/gv9cand9rqcew9sceoirbfm9l2bl +1 -0
  68. data/spec/dummy/tmp/storage--ruby-3.3.5/m2/ce/m2cehdwpmdl0s5vgylxc1tcbxlr2 +1 -0
  69. data/spec/dummy/tmp/storage--ruby-3.3.5/md/rj/mdrjgxirkdtyfijfwdxn37dswspm +1 -0
  70. data/spec/dummy/tmp/storage--ruby-3.3.5/xv/oi/xvoijswvk9a0blrua7x5yl94a6qw +1 -0
  71. data/spec/dummy/tmp/storage--ruby-3.3.5/z6/cw/z6cw41euxe15z3ao5wkypp0y9liw +1 -0
  72. data/spec/factories/answers_factory.rb +4 -4
  73. data/spec/factories/attempts_factory.rb +2 -2
  74. data/spec/factories/questions_factory.rb +13 -7
  75. data/spec/factories/surveys_factory.rb +3 -3
  76. data/spec/factories/users_factory.rb +5 -0
  77. data/spec/features/rapidfire/answering_questions_spec.rb +66 -9
  78. data/spec/features/rapidfire/editing_answers_spec.rb +6 -6
  79. data/spec/features/rapidfire/managing_questions_spec.rb +3 -3
  80. data/spec/features/rapidfire/managing_surveys_spec.rb +18 -3
  81. data/spec/fixtures/files/one.txt +1 -0
  82. data/spec/fixtures/files/two.txt +1 -0
  83. data/spec/models/rapidfire/answer_spec.rb +2 -2
  84. data/spec/models/rapidfire/attempt_spec.rb +5 -1
  85. data/spec/models/rapidfire/question_spec.rb +3 -3
  86. data/spec/models/rapidfire/questions/checkbox_spec.rb +3 -3
  87. data/spec/models/rapidfire/questions/date_spec.rb +2 -2
  88. data/spec/models/rapidfire/questions/file_spec.rb +57 -0
  89. data/spec/models/rapidfire/questions/multi_file_spec.rb +60 -0
  90. data/spec/models/rapidfire/questions/numeric_spec.rb +2 -2
  91. data/spec/models/rapidfire/questions/select_spec.rb +3 -3
  92. data/spec/models/rapidfire/survey_spec.rb +1 -1
  93. data/spec/serializers/rapidfire/question_result_serializer_spec.rb +1 -1
  94. data/spec/services/rapidfire/attempt_builder_spec.rb +64 -16
  95. data/spec/services/rapidfire/question_form_spec.rb +3 -3
  96. data/spec/services/rapidfire/survey_results_spec.rb +1 -1
  97. data/spec/spec_helper.rb +1 -1
  98. data/spec/support/rapidfire/answer_spec_helper.rb +12 -12
  99. data/spec/support/rapidfire/question_spec_helper.rb +7 -7
  100. data/spec/tasks/change_delimiter_from_comma_to_srsn_spec.rb +8 -8
  101. metadata +106 -240
  102. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-N/-Nnl5LNk36kVPJf_3kuN5xu7Ebj5HCbnrsyxphSIsdg.cache +0 -0
  103. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-o/-ojJ77Tf5UKdeHBEDmWtQ_3tnTJqQ0nd-YsKamqADUE.cache +0 -1
  104. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2b/2bErzwvSRmQv4cAljE5MLyihOZ0NcAw3J8cE3Lt0e4Q.cache +0 -0
  105. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4C/4CJwpaeIKdXtjEAju7_wQgXuYrzr55ARwRJeVKN7CPM.cache +0 -0
  106. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4U/4UispN4bfPqEzViX3T416Fr-T-7awbayU5fSryvLFNw.cache +0 -0
  107. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4k/4kH3sikLuE3o4jE_TNDlBNrlF7XAo_qYtBA6ckHGa5I.cache +0 -0
  108. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7d/7drzegBZRzthT8NYQjAVcg1mCXgXUj5USwB8GQ1o23Y.cache +0 -1
  109. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/80/80TT8hyotZ8-XWzQe7ELHNN8U6Mp2oGKwqa6Ckoksx0.cache +0 -1
  110. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8F/8FRx5PWf5mlaMlBnq_oPScrqvzB2csCEVlQ-FbB7Jy8.cache +0 -0
  111. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8M/8MNahq2o0fNDjjgT-erC9ZV3sFYg4ifFZqlLkcifOSA.cache +0 -1
  112. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8W/8WURt7NXtVdx9vbcRVtNXo2mqrL-0LPzw609oR1ZXnk.cache +0 -0
  113. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8k/8kFdViWjxSCYCA00vzJCIk-Hl7Dv6xCJ_Ce3jZALweg.cache +0 -1
  114. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9-/9-6v3_GF1yDfksWqHBJ96NiduUWyrW5R3k6MQzVpork.cache +0 -0
  115. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/94/94L1rKpX0k77vTIGtqElUDP4dpQXrCmvpI9CmQcZ_aM.cache +0 -1
  116. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9s/9s2S3Z_vncpN-gwuV05kcjhELi_kX-saO8shiQRx8cU.cache +0 -0
  117. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AS/AS1POBxm-FJcvGXfKUC02RI960YWQRZP6B5bJ9Pc8qU.cache +0 -1
  118. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AS/Asy0YwmSFpm-OyM4_Lb9v5CTPAePa74fljOfWyS3SJY.cache +0 -0
  119. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AY/AYSNFEx7wRHtwbVh3cNGid6wCMdfgyk9ocorMLfRqx4.cache +0 -0
  120. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Bk/BkxzEgJOpM-iCKaxrcsZlyRZeZKYVDlUj0C-sPXVGPc.cache +0 -0
  121. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/CW/CW8uYbA8W5LQ0T8Bo2ygunrwYuaHB0kJJuXlPlGA5F8.cache +0 -1
  122. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Co/CooYsvCeOgtDx9ZKSzQADfurwS4WGsVpyNXMlWum68U.cache +0 -0
  123. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/DC/DCdg25PhcFibsQItx9ofgOr68CacLQumta_lSKJCoOg.cache +0 -1
  124. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Db/DbmLC3wtG7ztEvkzmVAubW8vf37XdD0bT3Kh73oed1A.cache +0 -0
  125. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Db/dBQCcGB2fmK2CTrjrkLGxVmGKqBC2AZAx2C6TUMa1XY.cache +0 -0
  126. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Dn/Dn7Jw00mRZVDDxhjSg9300HJb_1875nlul_DHMMinn8.cache +0 -1
  127. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/IH/IHV1NrIJaxcdliBIo7Z7i28Nqm-8xd7RplmATbQZysI.cache +0 -0
  128. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ie/IemA55SqXkoyW_cD7FDwSk834ZydXI6UJpy7QsD-H5Q.cache +0 -0
  129. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/K7/K7SHc_erMPqr16VuAuVxvKfOUmN9Xf9zCR5Mmr6jOTo.cache +0 -0
  130. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KG/KGhjc0Py_DB3csmx7Y7NGPUOfnsPXP_KJc94bFEIZls.cache +0 -1
  131. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Lz/LzA8Mm_F0jmw6BK_4ca5scIcIGc6RjWV54G-BeQv8cA.cache +0 -0
  132. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/MP/MPTz2thdBdQPKUgb5k1oYWT6cmJYgRTEz_NEYDQt7E0.cache +0 -0
  133. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Mt/MtTjUV8qKCTEH961LJhYQWADgVragV9D9xWWiCmxyNc.cache +0 -1
  134. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/O9/O9WxLI48Zh1ES7ZCQC-cX2C7A_-Wg_c_kUOsIHodXW0.cache +0 -0
  135. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qo/QoZwnBtkSf3joyR1_5FKACUOgfoO35xMFOfLJkJqFD8.cache +0 -1
  136. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/R6/R6G-TFFztlxL5XDMIFX62wKkfUfmib6oV93z-xCZWsU.cache +0 -1
  137. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ry/Ry0Py6y0kHcEYq6qNWzUVQaMeP_p4kGPbD3ZchhmvEA.cache +0 -1
  138. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/SD/SDy6hVbUInn62jE9aAJObZ8NmVkGE5sF7KxhzNEwjys.cache +0 -0
  139. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/SD/sdxeRQBFEvjbUw-k3jsefKcslmEkm88PryW_XDPfOWU.cache +0 -0
  140. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/SH/SHUtigN8XJz-0yTSrOMb-kFlv8iOSvIKmMU76EwSoY0.cache +0 -0
  141. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Tg/TgTcVvqf5KTGti25aDSVdPzdEFSzFCA7TIgv36nVcSw.cache +0 -0
  142. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Tj/TjvztGCZ2bx84O9DtrIqlbV9f36XZWuZRucFAwvdgJI.cache +0 -0
  143. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Tw/Twx5_JY_0JVEAdweDWUNH8zBfK8PB6OnwROdMaXHv98.cache +0 -1
  144. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/UD/UD9ueo8syy1g__X14lIaWY51JAsI5nkxjvn4iz7-B68.cache +0 -1
  145. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/VY/VYOSVFxELVZ_dWFjIfo96exB1iYypEPPaE0U-NYUk3I.cache +0 -0
  146. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vq/VqF69IHPfaZOy6Wd3s10PIQmt2iWbU7UKgi7gGhoY6c.cache +0 -1
  147. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/W3/W3k3ezbkIWPsSAffgGGMKKSe_1CPV2jCUAXtFPSKTjE.cache +0 -0
  148. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/XY/XYnyPDtRIxqi5PSIcR0DKovMSyfgt-vquXm2oF4YcYU.cache +0 -0
  149. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Xe/Xez_IMQeyfLa4U_cntyZgtqAxc9P-spYMcKOwgwqfUk.cache +0 -1
  150. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Xp/XpKq_V1bVRTt2Dm9n2LFly2fc7rc63m5n0TkruAIT9U.cache +0 -1
  151. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/YQ/YQ07c7yZvQDkWCDNv-r_m3MczWVJMkpDlY6mItSQvDI.cache +0 -0
  152. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_D/_Du4UKNyRoKp1L8GangzMxQuHGRXv9UNLRFzUUG-8Mo.cache +0 -0
  153. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_i/_ioj978qaHpKe71YAPRTMr52bYBz1jBQH_a9jnVNxto.cache +0 -1
  154. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/a9/a9w-3USbjccL8aE_56A0EsenyNCD6btCxgmr4_s-LVk.cache +0 -0
  155. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/c6/c6TDdHnqxfaHueLdYt538jXw_7RBFpECFkp7A4pWUfs.cache +0 -1
  156. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dH/dH4Xkqb5rV9DHHmRa_ODseSEFnlwS0AXeHgoCYqkkZ8.cache +0 -0
  157. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dU/dUHj3xc9qlZfXc7VP69mfddx5l1sXwlfejSWXIdb1JQ.cache +0 -1
  158. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/de/derm8VJMOzbaRf2rY8Vz6WSHk5w-XAKJIsAIHU5Ng58.cache +0 -1
  159. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/e6/e6jkUzONoMPGAC7nyZsGla8Zm7wPlhXwijdHIYF-FTo.cache +0 -0
  160. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fJ/fJ5wsH-IHhi_3Wg-4Yk01_O8Bw8SpcxPh-PaN6n38CQ.cache +0 -0
  161. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/g3/g3XXzOg1WKmExnfECaHxaHbjrF8feoJ60TwJJQzWlhI.cache +0 -0
  162. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/g4/g4tbfWjrt8uCm6WfFre4E1yEp4WC9rV9pFrA_9VHQys.cache +0 -0
  163. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gm/gmSFGhfFSAm1wrLyyGXOUXMn-kygBbG7Zf3unPKzEWw.cache +0 -1
  164. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gz/gz6bIRfuHgLuNBVVsocUuzLbEU4gEneTbmvzi27eoho.cache +0 -0
  165. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hM/hMgVzrZus4Z8I8AXg5NPYgizKLI5WwSbt5NKdK00slk.cache +0 -0
  166. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iw/iwQwbZENFRwrGzETXtK_2_3aqWyAENDNwJAdJu1RoBg.cache +0 -1
  167. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kJ/kJSsmIsKQHNWdfJ2rMMpTZQ6DeAipIUyiXdftUlXr4I.cache +0 -0
  168. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ky/ky_7gNCiNp9E5HHXqszipoMZuSpcxD9ceXe46g_5VzI.cache +0 -1
  169. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lJ/lJf_GZ6JzbMPq2WIEKNQKFh5vI9T8ylMDcZQMcgj1fg.cache +0 -1
  170. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lo/lo0mbuMJiW9QksbTzvZ6N6aknuNrk1sJCprfNsMJw50.cache +0 -0
  171. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/m8/m801v81Cvh2CcUpw7286U_9CC2tO0z4XBKhfVx8OabE.cache +0 -1
  172. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mY/mYUyrqDItAnpMyLO7mNA7gPs93yNLb7Hr66jqh-aJmk.cache +0 -1
  173. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oT/oT7WJVi5xRK0iTbo-MPPVRF3__YNxLiK-kG2oSzeHgA.cache +0 -1
  174. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pr/prpHKLWY8kH_ZR0CBQBubKTbYRVzUx-u2RzceRwSedM.cache +0 -0
  175. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/py/py8m2jF8ezxgbkf0QTl2FPU21gpWQgvz96UpLr4JCbQ.cache +0 -1
  176. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/q3/q3AuG3GbIVzhGBdYCriWe8FktR40JLxYfJyauA0-CCs.cache +0 -1
  177. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/q6/q6BYa32YJF11eGVapO4ouNl6gayPIsARgMavlzZmoi0.cache +0 -0
  178. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/q7/q7yl5Q_Rk3hQdNI2dKzooG6EkbWvfGaywsvHDtNBX3E.cache +0 -0
  179. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rc/rcasFMX-bUWsjC8vmfqpoKL6LDbNyRqjBOBJn6KxQrM.cache +0 -1
  180. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rh/rh0ehR00zu0AmhmksJoUmSMhi6eKb30JpiSLU1Y7vGY.cache +0 -0
  181. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/t6/t6ve2uEx0ZpKYVPLJkiSm3_3nVj8hVs0ouPs-j1Y-Lw.cache +0 -0
  182. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tF/tFs-J47Vhauit7rJvH6_RG3NydHacSvI1Wn_BPK8OBs.cache +0 -1
  183. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uU/uUfexZe40_0TvILVKPsXUS5gjsc4iul3OZCrWoXS0Qo.cache +0 -1
  184. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vF/vFj_rUSzkEPWTAvaVnIUzkZIbfolIXH2bitACRZYWAU.cache +0 -1
  185. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vk/vk-e_ORxd49RmmTia4r2ajyVw0p-xcUuz8uz8Nx_LUw.cache +0 -1
  186. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wa/wab9PO75nglTE-rq2pVPg22CRkZW_yTq_WcZ6BEp8T0.cache +0 -0
  187. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wd/wdHNDzQjfQYx2VQbObEoz4iNxGhcuum4uypNBmnuNpA.cache +0 -1
  188. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wu/wuO0z3wuhphrqHOHqZdrZd6lFv2u0_Gq7BkDoc_8cEw.cache +0 -1
  189. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/x7/x7KkTV3ibfIEysLB_ug5bfmnn2VLV_BldukPR3EoPBk.cache +0 -0
  190. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xg/xge95XbE6Me8MVp8Pnz9FbKOZhvzndxHzh-uOjZV5_s.cache +0 -0
  191. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xz/Xz-wkd5XTDRNs5mNRhBpx4RSe0LN9ajplnuDcli51jE.cache +0 -1
  192. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xz/xzFhuo3m7qD5I9Xc85aP9j6kR-iAOB0najl9uu7hdMc.cache +0 -1
  193. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yn/ynGH6ruy4vPfFCwXOH8rgd3f-UWmo05h37jjH0cii8E.cache +0 -1
  194. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yw/yw6SDVVxzUeXqN9VX1eCGWTN809mt05p0JnedEBCZ7w.cache +0 -0
  195. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zg/zg53gL5TWyca4nbWc_d4pFhJ7huiu6zm1BTDcALsP8c.cache +0 -1
@@ -1,7 +1,7 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :answer, :class => "Rapidfire::Answer" do
3
- attempt { FactoryGirl.create(:attempt) }
4
- question { FactoryGirl.create(:q_long) }
5
- answer_text "hello world"
3
+ attempt { FactoryBot.create(:attempt) }
4
+ question { FactoryBot.create(:q_long) }
5
+ answer_text { "hello world" }
6
6
  end
7
7
  end
@@ -1,5 +1,5 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :attempt, :class => "Rapidfire::Attempt" do
3
- survey { FactoryGirl.create(:survey) }
3
+ survey { FactoryBot.create(:survey) }
4
4
  end
5
5
  end
@@ -1,10 +1,10 @@
1
- FactoryGirl.define do
2
- factory :question do
3
- survey { FactoryGirl.create(:survey) }
4
- question_text "Sample Question"
1
+ FactoryBot.define do
2
+ factory :question, :class => "Rapidfire::Question" do
3
+ survey { FactoryBot.create(:survey) }
4
+ question_text { "Sample Question" }
5
5
 
6
6
  factory :q_checkbox, :class => "Rapidfire::Questions::Checkbox" do
7
- answer_options "hindi\r\ntelugu\r\nkannada\r\n"
7
+ answer_options { "hindi\r\ntelugu\r\nkannada\r\n" }
8
8
  end
9
9
 
10
10
  factory :q_date, :class => "Rapidfire::Questions::Date" do
@@ -17,14 +17,20 @@ FactoryGirl.define do
17
17
  end
18
18
 
19
19
  factory :q_radio, :class => "Rapidfire::Questions::Radio" do
20
- answer_options "male\r\nfemale\r\n"
20
+ answer_options { "male\r\nfemale\r\n" }
21
21
  end
22
22
 
23
23
  factory :q_select, :class => "Rapidfire::Questions::Select" do
24
- answer_options "mac\r\nwindows\r\n"
24
+ answer_options { "mac\r\nwindows\r\n" }
25
25
  end
26
26
 
27
27
  factory :q_short, :class => "Rapidfire::Questions::Short" do
28
28
  end
29
+
30
+ factory :q_file, :class => "Rapidfire::Questions::File" do
31
+ end
32
+
33
+ factory :q_multifile, :class => "Rapidfire::Questions::MultiFile" do
34
+ end
29
35
  end
30
36
  end
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :survey, :class => "Rapidfire::Survey" do
3
- name "Test Survey"
4
- introduction "Please answer all the questions in this survey."
3
+ name { "Test Survey" }
4
+ introduction { "Please answer all the questions in this survey." }
5
5
  end
6
6
  end
@@ -0,0 +1,5 @@
1
+ FactoryBot.define do
2
+ factory :user do
3
+ name { "Test User" }
4
+ end
5
+ end
@@ -1,21 +1,24 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe "Surveys" do
4
- let!(:survey) { FactoryGirl.create(:survey, name: "Question Set", introduction: "Some introduction") }
5
- let!(:question1) { FactoryGirl.create(:q_long, survey: survey, question_text: "Long Question", validation_rules: { presence: "1" }) }
6
- let!(:question2) { FactoryGirl.create(:q_short, survey: survey, question_text: "Short Question") }
7
- let!(:question3) { FactoryGirl.create(:q_checkbox, survey: survey, question_text: "Checkbox question") }
8
- let!(:question4) { FactoryGirl.create(:q_checkbox, survey: survey, question_text: "Checkbox question", validation_rules: { presence: "1" }) }
4
+ let!(:survey) { FactoryBot.create(:survey, name: "Question Set", introduction: "Some introduction") }
9
5
 
10
- before do
6
+ it "displays survey introduction" do
11
7
  visit rapidfire.new_survey_attempt_path(survey)
12
- end
13
8
 
14
- it "displays survey introduction" do
15
9
  expect(page).to have_content "Some introduction"
16
10
  end
17
11
 
18
12
  describe "Answering Questions" do
13
+ let!(:question1) { FactoryBot.create(:q_long, survey: survey, question_text: "Long Question", validation_rules: { presence: "1" }) }
14
+ let!(:question2) { FactoryBot.create(:q_short, survey: survey, question_text: "Short Question") }
15
+ let!(:question3) { FactoryBot.create(:q_checkbox, survey: survey, question_text: "Checkbox question") }
16
+ let!(:question4) { FactoryBot.create(:q_checkbox, survey: survey, question_text: "Checkbox question", validation_rules: { presence: "1" }) }
17
+
18
+ before do
19
+ visit rapidfire.new_survey_attempt_path(survey)
20
+ end
21
+
19
22
  context "when all questions are answered" do
20
23
  before do
21
24
  fill_in "attempt_#{question1.id}_answer_text", with: "Long Answer"
@@ -53,7 +56,7 @@ describe "Surveys" do
53
56
  end
54
57
 
55
58
  it "shows error for missing answers" do
56
- expect(page).to have_content("can't be blank", count: 2)
59
+ expect(page).to have_content("can't be blank", count: 3)
57
60
  end
58
61
 
59
62
  it "shows already populated answers" do
@@ -85,4 +88,58 @@ describe "Surveys" do
85
88
  end
86
89
  end
87
90
  end
91
+
92
+ if "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}" >= "5.2"
93
+ describe "Answering File uploads" do
94
+ context "when the question is single file upload" do
95
+ let!(:question1) { FactoryBot.create(:q_file, survey: survey, question_text: "Avatar") }
96
+
97
+ it "persistes the file" do
98
+ visit rapidfire.new_survey_attempt_path(survey)
99
+
100
+ attach_file "attempt_#{question1.id}_file", file_fixture("one.txt")
101
+ click_button "Save"
102
+
103
+ answer = Rapidfire::Answer.first
104
+ expect(answer).to be_persisted
105
+ expect(answer.file.download).to eq("one\n")
106
+ end
107
+ end
108
+
109
+ context "when the question is multi file upload" do
110
+ let!(:question1) { FactoryBot.create(:q_multifile, survey: survey, question_text: "Images") }
111
+
112
+ it "persistes the file" do
113
+ visit rapidfire.new_survey_attempt_path(survey)
114
+
115
+ attach_file "attempt_#{question1.id}_files", [file_fixture("one.txt"), file_fixture("two.txt")]
116
+ click_button "Save"
117
+
118
+ answer = Rapidfire::Answer.first
119
+ expect(answer).to be_persisted
120
+ expect(answer.files.length).to eq 2
121
+
122
+ expect(answer.files[0].download).to eq("two\n")
123
+ expect(answer.files[1].download).to eq("one\n")
124
+ end
125
+ end
126
+
127
+ context "when persisting a file fails" do
128
+ let!(:question1) { FactoryBot.create(:q_file, survey: survey, question_text: "Avatar") }
129
+
130
+ it "bubbles up the error" do
131
+ visit rapidfire.new_survey_attempt_path(survey)
132
+
133
+ expect_any_instance_of(Rapidfire::Answer).to receive("file_attachment=") do
134
+ raise ActiveRecord::ActiveRecordError.new("Can't save the file")
135
+ end
136
+
137
+ attach_file "attempt_#{question1.id}_file", file_fixture("one.txt")
138
+ click_button "Save"
139
+
140
+ expect(page).to have_content("Can't save the file")
141
+ end
142
+ end
143
+ end
144
+ end
88
145
  end
@@ -1,12 +1,12 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe "Surveys" do
4
- let(:survey) { FactoryGirl.create(:survey, name: "Question Set") }
5
- let(:question1) { FactoryGirl.create(:q_long, survey: survey, question_text: "Long Question", validation_rules: { presence: "1" }) }
6
- let(:question2) { FactoryGirl.create(:q_short, survey: survey, question_text: "Short Question") }
7
- let(:attempt) { FactoryGirl.create(:attempt, survey: survey) }
8
- let!(:answer1) { FactoryGirl.create(:answer, attempt: attempt, question: question1, answer_text: "Long Answer") }
9
- let!(:answer2) { FactoryGirl.create(:answer, attempt: attempt, question: question2, answer_text: "Short Answer") }
4
+ let(:survey) { FactoryBot.create(:survey, name: "Question Set") }
5
+ let(:question1) { FactoryBot.create(:q_long, survey: survey, question_text: "Long Question", validation_rules: { presence: "1" }) }
6
+ let(:question2) { FactoryBot.create(:q_short, survey: survey, question_text: "Short Question") }
7
+ let(:attempt) { FactoryBot.create(:attempt, survey: survey) }
8
+ let!(:answer1) { FactoryBot.create(:answer, attempt: attempt, question: question1, answer_text: "Long Answer") }
9
+ let!(:answer2) { FactoryBot.create(:answer, attempt: attempt, question: question2, answer_text: "Short Answer") }
10
10
  before do
11
11
  visit rapidfire.edit_survey_attempt_path(survey, attempt)
12
12
  end
@@ -1,9 +1,9 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe "Questions" do
4
- let(:survey) { FactoryGirl.create(:survey, name: "Question Set") }
5
- let(:question1) { FactoryGirl.create(:q_long, survey: survey, question_text: "Long Question") }
6
- let(:question2) { FactoryGirl.create(:q_short, survey: survey, question_text: "Short Question") }
4
+ let(:survey) { FactoryBot.create(:survey, name: "Question Set") }
5
+ let(:question1) { FactoryBot.create(:q_long, survey: survey, question_text: "Long Question") }
6
+ let(:question2) { FactoryBot.create(:q_short, survey: survey, question_text: "Short Question") }
7
7
  before do
8
8
  [question1, question2]
9
9
  end
@@ -4,9 +4,9 @@ describe "Surveys" do
4
4
  include Rapidfire::QuestionSpecHelper
5
5
  include Rapidfire::AnswerSpecHelper
6
6
 
7
- let(:survey) { FactoryGirl.create(:survey, name: "Question Set") }
8
- let(:question1) { FactoryGirl.create(:q_long, survey: survey, question_text: "Long Question") }
9
- let(:question2) { FactoryGirl.create(:q_short, survey: survey, question_text: "Short Question") }
7
+ let(:survey) { FactoryBot.create(:survey, name: "Question Set") }
8
+ let(:question1) { FactoryBot.create(:q_long, survey: survey, question_text: "Long Question") }
9
+ let(:question2) { FactoryBot.create(:q_short, survey: survey, question_text: "Short Question") }
10
10
  before do
11
11
  [question1, question2]
12
12
  end
@@ -94,6 +94,21 @@ describe "Surveys" do
94
94
  expect(page).not_to have_link "New Survey"
95
95
  end
96
96
  end
97
+
98
+ context "when creating a survey fails" do
99
+ before do
100
+ allow_any_instance_of(ApplicationController).to receive(:can_administer?).and_return(true)
101
+ end
102
+
103
+ it "throws an error message" do
104
+ visit rapidfire.root_path
105
+ click_link "New Survey"
106
+
107
+ click_button "Create Survey"
108
+
109
+ expect(page).to have_content "Name can't be blank"
110
+ end
111
+ end
97
112
  end
98
113
 
99
114
  describe "EDITING Surveys" do
@@ -0,0 +1 @@
1
+ one
@@ -0,0 +1 @@
1
+ two
@@ -2,12 +2,12 @@ require 'spec_helper'
2
2
 
3
3
  describe Rapidfire::Answer do
4
4
  describe "Validations" do
5
- subject { FactoryGirl.build(:answer) }
5
+ subject { FactoryBot.build(:answer) }
6
6
  it { is_expected.to validate_presence_of(:question) }
7
7
  it { is_expected.to validate_presence_of(:attempt) }
8
8
 
9
9
  context "when validations are run" do
10
- let(:answer) { FactoryGirl.build(:answer) }
10
+ let(:answer) { FactoryBot.build(:answer) }
11
11
 
12
12
  it "delegates validation of answer text to question" do
13
13
  expect(answer.question).to receive(:validate_answer).with(answer).once
@@ -3,7 +3,11 @@ require 'spec_helper'
3
3
  describe Rapidfire::Attempt do
4
4
  describe "Associations" do
5
5
  it { is_expected.to belong_to(:survey) }
6
- it { is_expected.to belong_to(:user) }
6
+ if Rails::VERSION::MAJOR >= 5
7
+ it { is_expected.to belong_to(:user).optional }
8
+ else
9
+ it { is_expected.to belong_to(:user) }
10
+ end
7
11
  it { is_expected.to have_many(:answers) }
8
12
  end
9
13
  end
@@ -11,7 +11,7 @@ describe Rapidfire::Question do
11
11
  end
12
12
 
13
13
  describe "#rules" do
14
- let(:question) { FactoryGirl.create(:q_long, validation_rules: validation_rules) }
14
+ let(:question) { FactoryBot.create(:q_long, validation_rules: validation_rules) }
15
15
 
16
16
  context "when there are no validation rules" do
17
17
  let(:validation_rules) { {} }
@@ -33,8 +33,8 @@ describe Rapidfire::Question do
33
33
  end
34
34
 
35
35
  describe "validate_answer" do
36
- let(:question) { FactoryGirl.create(:q_long, validation_rules: validation_rules) }
37
- let(:answer) { FactoryGirl.build(:answer, question: question, answer_text: answer_text) }
36
+ let(:question) { FactoryBot.create(:q_long, validation_rules: validation_rules) }
37
+ let(:answer) { FactoryBot.build(:answer, question: question, answer_text: answer_text) }
38
38
  before { answer.valid? }
39
39
 
40
40
  context "when there are no validation rules" do
@@ -6,7 +6,7 @@ describe Rapidfire::Questions::Checkbox do
6
6
  end
7
7
 
8
8
  describe "#options" do
9
- let(:question) { FactoryGirl.create(:q_select) }
9
+ let(:question) { FactoryBot.create(:q_select) }
10
10
 
11
11
  it "returns options" do
12
12
  expect(question.options).to match_array(["mac", "windows"])
@@ -14,8 +14,8 @@ describe Rapidfire::Questions::Checkbox do
14
14
  end
15
15
 
16
16
  describe "validate_answer" do
17
- let(:question) { FactoryGirl.create(:q_checkbox, validation_rules: validation_rules) }
18
- let(:answer) { FactoryGirl.build(:answer, question: question, answer_text: answer_text) }
17
+ let(:question) { FactoryBot.create(:q_checkbox, validation_rules: validation_rules) }
18
+ let(:answer) { FactoryBot.build(:answer, question: question, answer_text: answer_text) }
19
19
  before { answer.valid? }
20
20
 
21
21
  context "when there are no validation rules" do
@@ -2,8 +2,8 @@ require 'spec_helper'
2
2
 
3
3
  describe Rapidfire::Questions::Date do
4
4
  describe "validate_answer" do
5
- let(:question) { FactoryGirl.create(:q_date, validation_rules: validation_rules) }
6
- let(:answer) { FactoryGirl.build(:answer, question: question, answer_text: answer_text) }
5
+ let(:question) { FactoryBot.create(:q_date, validation_rules: validation_rules) }
6
+ let(:answer) { FactoryBot.build(:answer, question: question, answer_text: answer_text) }
7
7
  before { answer.valid? }
8
8
 
9
9
  context "when there are no validation rules" do
@@ -0,0 +1,57 @@
1
+ require 'spec_helper'
2
+
3
+ def fixture_file_upload(path, mime_type)
4
+ Rack::Test::UploadedFile.new(Pathname.new(file_fixture_path).join(path), mime_type, false)
5
+ end
6
+
7
+ describe Rapidfire::Questions::File do
8
+ describe "Validations" do
9
+ it { is_expected.to validate_presence_of(:survey) }
10
+ it { is_expected.to validate_presence_of(:question_text) }
11
+ end
12
+
13
+ describe "Associations" do
14
+ it { is_expected.to belong_to(:survey) }
15
+ end
16
+
17
+ if "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}" >= "5.2"
18
+ describe "validate_answer" do
19
+ let(:question) { FactoryBot.create(:q_file, validation_rules: validation_rules) }
20
+ let(:answer) { FactoryBot.build(:answer, question: question, file: file) }
21
+ before { answer.valid? }
22
+
23
+ context "when there are no validation rules" do
24
+ let(:validation_rules) { {} }
25
+ let(:file) { nil }
26
+
27
+ it "answer should pass validations" do
28
+ expect(answer.errors).to be_empty
29
+ end
30
+ end
31
+
32
+ context "when question needs a file attachment" do
33
+ let(:validation_rules) { { presence: "1" } }
34
+
35
+ context "when answer is empty" do
36
+ let(:file) { nil }
37
+
38
+ it "fails validations" do
39
+ expect(answer.errors).not_to be_empty
40
+ end
41
+
42
+ it "says answer should be present" do
43
+ expect(answer.errors[:file]).to include("can't be blank")
44
+ end
45
+ end
46
+
47
+ context "when answer is not empty" do
48
+ let(:file) { fixture_file_upload("one.txt", "text/plain") }
49
+
50
+ it "passes validations" do
51
+ expect(answer.errors).to be_empty
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,60 @@
1
+ require 'spec_helper'
2
+
3
+ def fixture_file_upload(path, mime_type)
4
+ Rack::Test::UploadedFile.new(Pathname.new(file_fixture_path).join(path), mime_type, false)
5
+ end
6
+
7
+ describe Rapidfire::Questions::MultiFile do
8
+ describe "Validations" do
9
+ it { is_expected.to validate_presence_of(:survey) }
10
+ it { is_expected.to validate_presence_of(:question_text) }
11
+ end
12
+
13
+ describe "Associations" do
14
+ it { is_expected.to belong_to(:survey) }
15
+ end
16
+
17
+ if "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}" >= "5.2"
18
+ describe "validate_answer" do
19
+ let(:question) { FactoryBot.create(:q_multifile, validation_rules: validation_rules) }
20
+ let(:answer) { FactoryBot.build(:answer, question: question, files: files) }
21
+ before { answer.valid? }
22
+
23
+ context "when there are no validation rules" do
24
+ let(:validation_rules) { {} }
25
+ let(:files) { [] }
26
+
27
+ it "answer should pass validations" do
28
+ expect(answer.errors).to be_empty
29
+ end
30
+ end
31
+
32
+ context "when question needs a file attachment" do
33
+ let(:validation_rules) { { presence: "1" } }
34
+
35
+ context "when answer is empty" do
36
+ let(:files) { [] }
37
+
38
+ it "fails validations" do
39
+ expect(answer.errors).not_to be_empty
40
+ end
41
+
42
+ it "says answer should be present" do
43
+ expect(answer.errors[:files]).to include("can't be blank")
44
+ end
45
+ end
46
+
47
+ context "when answer is not empty" do
48
+ let(:files) do
49
+ [fixture_file_upload("one.txt", "text/plain"),
50
+ fixture_file_upload("two.txt", "text/plain")]
51
+ end
52
+
53
+ it "passes validations" do
54
+ expect(answer.errors).to be_empty
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -2,8 +2,8 @@ require 'spec_helper'
2
2
 
3
3
  describe Rapidfire::Questions::Numeric do
4
4
  describe "validate_answer" do
5
- let(:question) { FactoryGirl.create(:q_numeric, validation_rules: validation_rules) }
6
- let(:answer) { FactoryGirl.build(:answer, question: question, answer_text: answer_text) }
5
+ let(:question) { FactoryBot.create(:q_numeric, validation_rules: validation_rules) }
6
+ let(:answer) { FactoryBot.build(:answer, question: question, answer_text: answer_text) }
7
7
  before { answer.valid? }
8
8
 
9
9
  context "when there are no validation rules" do
@@ -6,7 +6,7 @@ describe Rapidfire::Questions::Select do
6
6
  end
7
7
 
8
8
  describe "#options" do
9
- let(:question) { FactoryGirl.create(:q_select) }
9
+ let(:question) { FactoryBot.create(:q_select) }
10
10
 
11
11
  it "returns options" do
12
12
  expect(question.options).to match_array(["mac", "windows"])
@@ -14,8 +14,8 @@ describe Rapidfire::Questions::Select do
14
14
  end
15
15
 
16
16
  describe "validate_answer" do
17
- let(:question) { FactoryGirl.create(:q_select, validation_rules: validation_rules) }
18
- let(:answer) { FactoryGirl.build(:answer, question: question, answer_text: answer_text) }
17
+ let(:question) { FactoryBot.create(:q_select, validation_rules: validation_rules) }
18
+ let(:answer) { FactoryBot.build(:answer, question: question, answer_text: answer_text) }
19
19
  before { answer.valid? }
20
20
 
21
21
  context "when there are no validation rules" do
@@ -12,7 +12,7 @@ describe Rapidfire::Survey do
12
12
  end
13
13
 
14
14
  describe "factory" do
15
- let(:survey) { FactoryGirl.create(:survey) }
15
+ let(:survey) { FactoryBot.create(:survey) }
16
16
 
17
17
  it "has a name" do
18
18
  expect(survey.name).to eql("Test Survey")
@@ -4,7 +4,7 @@ describe Rapidfire::QuestionResultSerializer do
4
4
  include Rapidfire::QuestionSpecHelper
5
5
  include Rapidfire::AnswerSpecHelper
6
6
 
7
- let(:survey) { FactoryGirl.create(:survey) }
7
+ let(:survey) { FactoryBot.create(:survey) }
8
8
  let(:results) do
9
9
  Rapidfire::SurveyResults.new(survey: survey).extract
10
10
  end