spec_fill 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (498) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +7 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +39 -0
  8. data/Rakefile +6 -0
  9. data/bin/console +14 -0
  10. data/bin/setup +8 -0
  11. data/exe/spec_fill +4 -0
  12. data/lib/spec_fill/cli.rb +62 -0
  13. data/lib/spec_fill/version.rb +3 -0
  14. data/lib/spec_fill.rb +51 -0
  15. data/spec_fill.gemspec +39 -0
  16. data/vendor/bundle/ruby/2.6.0/bin/factory_fill +27 -0
  17. data/vendor/bundle/ruby/2.6.0/bin/htmldiff +29 -0
  18. data/vendor/bundle/ruby/2.6.0/bin/ldiff +29 -0
  19. data/vendor/bundle/ruby/2.6.0/bin/rake +27 -0
  20. data/vendor/bundle/ruby/2.6.0/bin/rspec +27 -0
  21. data/vendor/bundle/ruby/2.6.0/bin/thor +27 -0
  22. data/vendor/bundle/ruby/2.6.0/cache/diff-lcs-1.3.gem +0 -0
  23. data/vendor/bundle/ruby/2.6.0/cache/rake-10.5.0.gem +0 -0
  24. data/vendor/bundle/ruby/2.6.0/cache/rspec-3.9.0.gem +0 -0
  25. data/vendor/bundle/ruby/2.6.0/cache/rspec-core-3.9.0.gem +0 -0
  26. data/vendor/bundle/ruby/2.6.0/cache/rspec-expectations-3.9.0.gem +0 -0
  27. data/vendor/bundle/ruby/2.6.0/cache/rspec-mocks-3.9.0.gem +0 -0
  28. data/vendor/bundle/ruby/2.6.0/cache/rspec-support-3.9.0.gem +0 -0
  29. data/vendor/bundle/ruby/2.6.0/cache/thor-0.20.3.gem +0 -0
  30. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/.rspec +1 -0
  31. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/Code-of-Conduct.md +74 -0
  32. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/Contributing.md +83 -0
  33. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/History.md +220 -0
  34. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/License.md +39 -0
  35. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/Manifest.txt +37 -0
  36. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/README.rdoc +84 -0
  37. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/Rakefile +57 -0
  38. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/autotest/discover.rb +1 -0
  39. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/bin/htmldiff +32 -0
  40. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/bin/ldiff +6 -0
  41. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/docs/COPYING.txt +339 -0
  42. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/docs/artistic.txt +127 -0
  43. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/array.rb +7 -0
  44. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/block.rb +37 -0
  45. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/callbacks.rb +322 -0
  46. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/change.rb +181 -0
  47. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/htmldiff.rb +149 -0
  48. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb +276 -0
  49. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/internals.rb +307 -0
  50. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/ldiff.rb +167 -0
  51. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs/string.rb +5 -0
  52. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff/lcs.rb +725 -0
  53. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff-lcs.rb +3 -0
  54. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/change_spec.rb +65 -0
  55. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/diff_spec.rb +47 -0
  56. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/fixtures/ds1.csv +50 -0
  57. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/fixtures/ds2.csv +51 -0
  58. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/hunk_spec.rb +72 -0
  59. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/issues_spec.rb +49 -0
  60. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/lcs_spec.rb +56 -0
  61. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/ldiff_spec.rb +47 -0
  62. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/patch_spec.rb +422 -0
  63. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/sdiff_spec.rb +214 -0
  64. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/spec_helper.rb +321 -0
  65. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/traverse_balanced_spec.rb +310 -0
  66. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/traverse_sequences_spec.rb +139 -0
  67. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/.autotest +7 -0
  68. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/.rubocop.yml +27 -0
  69. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/.togglerc +7 -0
  70. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/CONTRIBUTING.rdoc +38 -0
  71. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/History.rdoc +659 -0
  72. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/MIT-LICENSE +21 -0
  73. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/Manifest.txt +166 -0
  74. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/README.rdoc +139 -0
  75. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/Rakefile +81 -0
  76. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/bin/rake +33 -0
  77. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/command_line_usage.rdoc +158 -0
  78. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/example/Rakefile1 +38 -0
  79. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/example/Rakefile2 +35 -0
  80. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/example/a.c +6 -0
  81. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/example/b.c +6 -0
  82. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/example/main.c +11 -0
  83. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/glossary.rdoc +42 -0
  84. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/jamis.rb +591 -0
  85. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/proto_rake.rdoc +127 -0
  86. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/rake.1 +141 -0
  87. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/rakefile.rdoc +624 -0
  88. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/rational.rdoc +151 -0
  89. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.4.14.rdoc +23 -0
  90. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.4.15.rdoc +35 -0
  91. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.0.rdoc +53 -0
  92. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.3.rdoc +78 -0
  93. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.5.4.rdoc +46 -0
  94. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.6.0.rdoc +141 -0
  95. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.0.rdoc +119 -0
  96. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.1.rdoc +59 -0
  97. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.2.rdoc +121 -0
  98. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.7.3.rdoc +47 -0
  99. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.0.rdoc +114 -0
  100. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.2.rdoc +165 -0
  101. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.3.rdoc +112 -0
  102. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.4.rdoc +147 -0
  103. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.5.rdoc +53 -0
  104. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.6.rdoc +37 -0
  105. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.8.7.rdoc +55 -0
  106. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.0.rdoc +112 -0
  107. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.1.rdoc +52 -0
  108. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
  109. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.rdoc +49 -0
  110. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.3.rdoc +102 -0
  111. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.4.rdoc +60 -0
  112. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.5.rdoc +55 -0
  113. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-0.9.6.rdoc +64 -0
  114. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.0.rdoc +178 -0
  115. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.1.rdoc +58 -0
  116. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.2.rdoc +53 -0
  117. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-10.0.3.rdoc +191 -0
  118. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/doc/release_notes/rake-10.1.0.rdoc +61 -0
  119. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/alt_system.rb +110 -0
  120. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/application.rb +790 -0
  121. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/backtrace.rb +23 -0
  122. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/clean.rb +76 -0
  123. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/cloneable.rb +16 -0
  124. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/.document +1 -0
  125. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/compositepublisher.rb +21 -0
  126. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/ftptools.rb +137 -0
  127. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/publisher.rb +81 -0
  128. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/rubyforgepublisher.rb +18 -0
  129. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/sshpublisher.rb +61 -0
  130. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/contrib/sys.rb +4 -0
  131. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/cpu_counter.rb +125 -0
  132. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/default_loader.rb +14 -0
  133. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/dsl_definition.rb +201 -0
  134. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/early_time.rb +21 -0
  135. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/ext/core.rb +25 -0
  136. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/ext/module.rb +2 -0
  137. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/ext/pathname.rb +25 -0
  138. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/ext/string.rb +175 -0
  139. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/ext/time.rb +18 -0
  140. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/file_creation_task.rb +24 -0
  141. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/file_list.rb +428 -0
  142. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/file_task.rb +46 -0
  143. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/file_utils.rb +128 -0
  144. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/file_utils_ext.rb +144 -0
  145. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/gempackagetask.rb +4 -0
  146. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/invocation_chain.rb +56 -0
  147. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/invocation_exception_mixin.rb +16 -0
  148. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/late_time.rb +17 -0
  149. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/linked_list.rb +103 -0
  150. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/loaders/makefile.rb +53 -0
  151. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/multi_task.rb +13 -0
  152. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/name_space.rb +38 -0
  153. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/packagetask.rb +199 -0
  154. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/pathmap.rb +3 -0
  155. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/phony.rb +15 -0
  156. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/private_reader.rb +20 -0
  157. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/promise.rb +99 -0
  158. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/pseudo_status.rb +29 -0
  159. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/rake_module.rb +38 -0
  160. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb +22 -0
  161. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/rdoctask.rb +4 -0
  162. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/ruby182_test_unit_fix.rb +29 -0
  163. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
  164. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/runtest.rb +27 -0
  165. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/scope.rb +42 -0
  166. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/task.rb +383 -0
  167. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/task_argument_error.rb +7 -0
  168. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/task_arguments.rb +98 -0
  169. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/task_manager.rb +307 -0
  170. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/tasklib.rb +24 -0
  171. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/testtask.rb +213 -0
  172. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/thread_history_display.rb +48 -0
  173. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/thread_pool.rb +164 -0
  174. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/trace_output.rb +22 -0
  175. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/version.rb +7 -0
  176. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake/win32.rb +56 -0
  177. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/lib/rake.rb +79 -0
  178. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/rakelib/publish.rake +20 -0
  179. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/rakelib/test_times.rake +25 -0
  180. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/file_creation.rb +34 -0
  181. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/helper.rb +129 -0
  182. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/support/rakefile_definitions.rb +478 -0
  183. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/support/ruby_runner.rb +34 -0
  184. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_private_reader.rb +42 -0
  185. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake.rb +40 -0
  186. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_application.rb +643 -0
  187. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_application_options.rb +468 -0
  188. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_backtrace.rb +119 -0
  189. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_clean.rb +61 -0
  190. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_cpu_counter.rb +68 -0
  191. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_definitions.rb +84 -0
  192. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_directory_task.rb +76 -0
  193. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_dsl.rb +40 -0
  194. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_early_time.rb +31 -0
  195. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_extension.rb +59 -0
  196. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_file_creation_task.rb +56 -0
  197. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_file_list.rb +670 -0
  198. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_file_list_path_map.rb +8 -0
  199. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_file_task.rb +197 -0
  200. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_file_utils.rb +314 -0
  201. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_ftp_file.rb +74 -0
  202. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_functional.rb +482 -0
  203. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_invocation_chain.rb +64 -0
  204. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_late_time.rb +18 -0
  205. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_linked_list.rb +84 -0
  206. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_makefile_loader.rb +46 -0
  207. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_multi_task.rb +64 -0
  208. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_name_space.rb +57 -0
  209. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_package_task.rb +79 -0
  210. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_path_map.rb +168 -0
  211. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_path_map_explode.rb +34 -0
  212. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_path_map_partial.rb +18 -0
  213. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_pathname_extensions.rb +15 -0
  214. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_pseudo_status.rb +21 -0
  215. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_rake_test_loader.rb +20 -0
  216. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_reduce_compat.rb +26 -0
  217. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_require.rb +40 -0
  218. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_rules.rb +388 -0
  219. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_scope.rb +44 -0
  220. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task.rb +393 -0
  221. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task_argument_parsing.rb +119 -0
  222. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task_arguments.rb +127 -0
  223. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task_lib.rb +9 -0
  224. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task_manager.rb +178 -0
  225. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
  226. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_task_with_arguments.rb +172 -0
  227. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_test_task.rb +146 -0
  228. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_thread_pool.rb +145 -0
  229. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_top_level_functions.rb +71 -0
  230. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_rake_win32.rb +72 -0
  231. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_thread_history_display.rb +101 -0
  232. data/vendor/bundle/ruby/2.6.0/gems/rake-10.5.0/test/test_trace_output.rb +52 -0
  233. data/vendor/bundle/ruby/2.6.0/gems/rspec-3.9.0/LICENSE.md +27 -0
  234. data/vendor/bundle/ruby/2.6.0/gems/rspec-3.9.0/README.md +43 -0
  235. data/vendor/bundle/ruby/2.6.0/gems/rspec-3.9.0/lib/rspec/version.rb +5 -0
  236. data/vendor/bundle/ruby/2.6.0/gems/rspec-3.9.0/lib/rspec.rb +3 -0
  237. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/.document +5 -0
  238. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/.yardopts +8 -0
  239. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/Changelog.md +2265 -0
  240. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/LICENSE.md +26 -0
  241. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/README.md +384 -0
  242. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/exe/rspec +4 -0
  243. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/autorun.rb +3 -0
  244. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/backtrace_formatter.rb +65 -0
  245. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/bisect/coordinator.rb +62 -0
  246. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/bisect/example_minimizer.rb +173 -0
  247. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/bisect/fork_runner.rb +134 -0
  248. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/bisect/server.rb +61 -0
  249. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/bisect/shell_command.rb +126 -0
  250. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/bisect/shell_runner.rb +73 -0
  251. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/bisect/utilities.rb +58 -0
  252. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/configuration.rb +2336 -0
  253. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/configuration_options.rb +233 -0
  254. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/did_you_mean.rb +46 -0
  255. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/drb.rb +113 -0
  256. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/dsl.rb +98 -0
  257. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/example.rb +656 -0
  258. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/example_group.rb +889 -0
  259. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/example_status_persister.rb +235 -0
  260. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/filter_manager.rb +231 -0
  261. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/flat_map.rb +20 -0
  262. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
  263. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
  264. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
  265. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
  266. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
  267. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/console_codes.rb +68 -0
  268. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
  269. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/documentation_formatter.rb +102 -0
  270. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/exception_presenter.rb +508 -0
  271. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/failure_list_formatter.rb +23 -0
  272. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
  273. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/helpers.rb +110 -0
  274. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/html_formatter.rb +153 -0
  275. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/html_printer.rb +414 -0
  276. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
  277. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/json_formatter.rb +102 -0
  278. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
  279. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/progress_formatter.rb +29 -0
  280. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/protocol.rb +182 -0
  281. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
  282. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
  283. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/formatters.rb +272 -0
  284. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/hooks.rb +632 -0
  285. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/invocations.rb +87 -0
  286. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/memoized_helpers.rb +554 -0
  287. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/metadata.rb +498 -0
  288. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/metadata_filter.rb +255 -0
  289. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
  290. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
  291. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
  292. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
  293. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
  294. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
  295. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/notifications.rb +521 -0
  296. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/option_parser.rb +317 -0
  297. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/ordering.rb +158 -0
  298. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/output_wrapper.rb +29 -0
  299. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/pending.rb +165 -0
  300. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/profiler.rb +34 -0
  301. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/project_initializer/.rspec +1 -0
  302. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +100 -0
  303. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/project_initializer.rb +48 -0
  304. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/rake_task.rb +188 -0
  305. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/reporter.rb +265 -0
  306. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/ruby_project.rb +53 -0
  307. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/runner.rb +204 -0
  308. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/sandbox.rb +37 -0
  309. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/set.rb +54 -0
  310. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/shared_context.rb +55 -0
  311. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/shared_example_group.rb +269 -0
  312. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/shell_escape.rb +49 -0
  313. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
  314. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/version.rb +9 -0
  315. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/warnings.rb +40 -0
  316. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core/world.rb +275 -0
  317. data/vendor/bundle/ruby/2.6.0/gems/rspec-core-3.9.0/lib/rspec/core.rb +186 -0
  318. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/.document +5 -0
  319. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/.yardopts +6 -0
  320. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/Changelog.md +1170 -0
  321. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/LICENSE.md +25 -0
  322. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/README.md +320 -0
  323. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
  324. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/expectations/configuration.rb +215 -0
  325. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/expectations/expectation_target.rb +127 -0
  326. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/expectations/fail_with.rb +39 -0
  327. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/expectations/failure_aggregator.rb +194 -0
  328. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/expectations/handler.rb +170 -0
  329. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/expectations/minitest_integration.rb +58 -0
  330. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/expectations/syntax.rb +132 -0
  331. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/expectations/version.rb +8 -0
  332. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/expectations.rb +82 -0
  333. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/aliased_matcher.rb +116 -0
  334. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/all.rb +86 -0
  335. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
  336. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/be.rb +288 -0
  337. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/be_between.rb +77 -0
  338. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/be_instance_of.rb +26 -0
  339. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/be_kind_of.rb +20 -0
  340. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/be_within.rb +72 -0
  341. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/change.rb +428 -0
  342. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/compound.rb +276 -0
  343. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/contain_exactly.rb +302 -0
  344. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/cover.rb +24 -0
  345. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/eq.rb +40 -0
  346. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/eql.rb +34 -0
  347. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/equal.rb +81 -0
  348. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/exist.rb +90 -0
  349. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/has.rb +103 -0
  350. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  351. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/include.rb +149 -0
  352. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/match.rb +106 -0
  353. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/operators.rb +128 -0
  354. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/output.rb +200 -0
  355. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/raise_error.rb +230 -0
  356. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/respond_to.rb +174 -0
  357. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/satisfy.rb +60 -0
  358. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  359. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
  360. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in/yield.rb +432 -0
  361. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/built_in.rb +52 -0
  362. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/composable.rb +171 -0
  363. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/dsl.rb +534 -0
  364. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/english_phrasing.rb +58 -0
  365. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +82 -0
  366. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/fail_matchers.rb +42 -0
  367. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/generated_descriptions.rb +41 -0
  368. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/matcher_delegator.rb +35 -0
  369. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers/matcher_protocol.rb +99 -0
  370. data/vendor/bundle/ruby/2.6.0/gems/rspec-expectations-3.9.0/lib/rspec/matchers.rb +1038 -0
  371. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/.document +5 -0
  372. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/.yardopts +6 -0
  373. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/Changelog.md +1125 -0
  374. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/LICENSE.md +25 -0
  375. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/README.md +463 -0
  376. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/chain.rb +111 -0
  377. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
  378. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
  379. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
  380. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
  381. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/proxy.rb +116 -0
  382. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/recorder.rb +289 -0
  383. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
  384. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
  385. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/any_instance.rb +11 -0
  386. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/argument_list_matcher.rb +100 -0
  387. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/argument_matchers.rb +322 -0
  388. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/configuration.rb +212 -0
  389. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/error_generator.rb +369 -0
  390. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/example_methods.rb +434 -0
  391. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/instance_method_stasher.rb +146 -0
  392. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/marshal_extension.rb +41 -0
  393. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
  394. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/matchers/have_received.rb +134 -0
  395. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/matchers/receive.rb +132 -0
  396. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
  397. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
  398. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/message_chain.rb +87 -0
  399. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/message_expectation.rb +751 -0
  400. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/method_double.rb +287 -0
  401. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/method_reference.rb +202 -0
  402. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/minitest_integration.rb +68 -0
  403. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/mutate_const.rb +339 -0
  404. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/object_reference.rb +149 -0
  405. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/order_group.rb +81 -0
  406. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/proxy.rb +503 -0
  407. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/space.rb +238 -0
  408. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/standalone.rb +3 -0
  409. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/syntax.rb +325 -0
  410. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/targets.rb +124 -0
  411. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/test_double.rb +171 -0
  412. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/verifying_double.rb +129 -0
  413. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
  414. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/verifying_proxy.rb +220 -0
  415. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks/version.rb +9 -0
  416. data/vendor/bundle/ruby/2.6.0/gems/rspec-mocks-3.9.0/lib/rspec/mocks.rb +130 -0
  417. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/Changelog.md +275 -0
  418. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/LICENSE.md +23 -0
  419. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/README.md +40 -0
  420. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/caller_filter.rb +83 -0
  421. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/comparable_version.rb +46 -0
  422. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/differ.rb +215 -0
  423. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/directory_maker.rb +63 -0
  424. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/encoded_string.rb +165 -0
  425. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
  426. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/hunk_generator.rb +47 -0
  427. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/matcher_definition.rb +42 -0
  428. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/method_signature_verifier.rb +438 -0
  429. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/mutex.rb +73 -0
  430. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/object_formatter.rb +275 -0
  431. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/recursive_const_methods.rb +76 -0
  432. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/reentrant_mutex.rb +53 -0
  433. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/ruby_features.rb +176 -0
  434. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/source/location.rb +21 -0
  435. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/source/node.rb +110 -0
  436. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/source/token.rb +87 -0
  437. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/source.rb +75 -0
  438. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
  439. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/spec/formatting_support.rb +9 -0
  440. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/spec/in_sub_process.rb +69 -0
  441. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/spec/library_wide_checks.rb +150 -0
  442. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/spec/shell_out.rb +89 -0
  443. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
  444. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/spec/string_matcher.rb +46 -0
  445. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
  446. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
  447. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/spec.rb +81 -0
  448. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/version.rb +7 -0
  449. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support/warnings.rb +39 -0
  450. data/vendor/bundle/ruby/2.6.0/gems/rspec-support-3.9.0/lib/rspec/support.rb +149 -0
  451. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/.document +5 -0
  452. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/CHANGELOG.md +204 -0
  453. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/CONTRIBUTING.md +15 -0
  454. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/LICENSE.md +20 -0
  455. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/README.md +51 -0
  456. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/bin/thor +6 -0
  457. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/actions/create_file.rb +104 -0
  458. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/actions/create_link.rb +60 -0
  459. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/actions/directory.rb +118 -0
  460. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/actions/empty_directory.rb +143 -0
  461. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/actions/file_manipulation.rb +373 -0
  462. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/actions/inject_into_file.rb +109 -0
  463. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/actions.rb +331 -0
  464. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/base.rb +678 -0
  465. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb +135 -0
  466. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/core_ext/hash_with_indifferent_access.rb +97 -0
  467. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/core_ext/io_binary_read.rb +12 -0
  468. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/core_ext/ordered_hash.rb +129 -0
  469. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/error.rb +114 -0
  470. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/group.rb +281 -0
  471. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb +177 -0
  472. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/line_editor/basic.rb +37 -0
  473. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/line_editor/readline.rb +88 -0
  474. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/line_editor.rb +17 -0
  475. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/parser/argument.rb +70 -0
  476. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/parser/arguments.rb +175 -0
  477. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/parser/option.rb +146 -0
  478. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/parser/options.rb +226 -0
  479. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/parser.rb +4 -0
  480. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/rake_compat.rb +71 -0
  481. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/runner.rb +324 -0
  482. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/shell/basic.rb +482 -0
  483. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/shell/color.rb +149 -0
  484. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/shell/html.rb +126 -0
  485. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/shell.rb +81 -0
  486. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/util.rb +268 -0
  487. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/version.rb +3 -0
  488. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb +509 -0
  489. data/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/thor.gemspec +21 -0
  490. data/vendor/bundle/ruby/2.6.0/specifications/diff-lcs-1.3.gemspec +61 -0
  491. data/vendor/bundle/ruby/2.6.0/specifications/rake-10.5.0.gemspec +43 -0
  492. data/vendor/bundle/ruby/2.6.0/specifications/rspec-3.9.0.gemspec +43 -0
  493. data/vendor/bundle/ruby/2.6.0/specifications/rspec-core-3.9.0.gemspec +63 -0
  494. data/vendor/bundle/ruby/2.6.0/specifications/rspec-expectations-3.9.0.gemspec +51 -0
  495. data/vendor/bundle/ruby/2.6.0/specifications/rspec-mocks-3.9.0.gemspec +51 -0
  496. data/vendor/bundle/ruby/2.6.0/specifications/rspec-support-3.9.0.gemspec +39 -0
  497. data/vendor/bundle/ruby/2.6.0/specifications/thor-0.20.3.gemspec +35 -0
  498. metadata +600 -0
@@ -0,0 +1,632 @@
1
+ module RSpec
2
+ module Core
3
+ # Provides `before`, `after` and `around` hooks as a means of
4
+ # supporting common setup and teardown. This module is extended
5
+ # onto {ExampleGroup}, making the methods available from any `describe`
6
+ # or `context` block and included in {Configuration}, making them
7
+ # available off of the configuration object to define global setup
8
+ # or teardown logic.
9
+ module Hooks
10
+ # @api public
11
+ #
12
+ # @overload before(&block)
13
+ # @overload before(scope, &block)
14
+ # @param scope [Symbol] `:example`, `:context`, or `:suite`
15
+ # (defaults to `:example`)
16
+ # @overload before(scope, conditions, &block)
17
+ # @param scope [Symbol] `:example`, `:context`, or `:suite`
18
+ # (defaults to `:example`)
19
+ # @param conditions [Hash]
20
+ # constrains this hook to examples matching these conditions e.g.
21
+ # `before(:example, :ui => true) { ... }` will only run with examples
22
+ # or groups declared with `:ui => true`.
23
+ # @overload before(conditions, &block)
24
+ # @param conditions [Hash]
25
+ # constrains this hook to examples matching these conditions e.g.
26
+ # `before(:example, :ui => true) { ... }` will only run with examples
27
+ # or groups declared with `:ui => true`.
28
+ #
29
+ # @see #after
30
+ # @see #around
31
+ # @see ExampleGroup
32
+ # @see SharedContext
33
+ # @see SharedExampleGroup
34
+ # @see Configuration
35
+ #
36
+ # Declare a block of code to be run before each example (using `:example`)
37
+ # or once before any example (using `:context`). These are usually
38
+ # declared directly in the {ExampleGroup} to which they apply, but they
39
+ # can also be shared across multiple groups.
40
+ #
41
+ # You can also use `before(:suite)` to run a block of code before any
42
+ # example groups are run. This should be declared in {RSpec.configure}.
43
+ #
44
+ # Instance variables declared in `before(:example)` or `before(:context)`
45
+ # are accessible within each example.
46
+ #
47
+ # ### Order
48
+ #
49
+ # `before` hooks are stored in three scopes, which are run in order:
50
+ # `:suite`, `:context`, and `:example`. They can also be declared in
51
+ # several different places: `RSpec.configure`, a parent group, the current
52
+ # group. They are run in the following order:
53
+ #
54
+ # before(:suite) # Declared in RSpec.configure.
55
+ # before(:context) # Declared in RSpec.configure.
56
+ # before(:context) # Declared in a parent group.
57
+ # before(:context) # Declared in the current group.
58
+ # before(:example) # Declared in RSpec.configure.
59
+ # before(:example) # Declared in a parent group.
60
+ # before(:example) # Declared in the current group.
61
+ #
62
+ # If more than one `before` is declared within any one scope, they are run
63
+ # in the order in which they are declared. Any `around` hooks will execute
64
+ # later than any `before` hook regardless of scope.
65
+ #
66
+ # ### Conditions
67
+ #
68
+ # When you add a conditions hash to `before(:example)` or
69
+ # `before(:context)`, RSpec will only apply that hook to groups or
70
+ # examples that match the conditions. e.g.
71
+ #
72
+ # RSpec.configure do |config|
73
+ # config.before(:example, :authorized => true) do
74
+ # log_in_as :authorized_user
75
+ # end
76
+ # end
77
+ #
78
+ # RSpec.describe Something, :authorized => true do
79
+ # # The before hook will run in before each example in this group.
80
+ # end
81
+ #
82
+ # RSpec.describe SomethingElse do
83
+ # it "does something", :authorized => true do
84
+ # # The before hook will run before this example.
85
+ # end
86
+ #
87
+ # it "does something else" do
88
+ # # The hook will not run before this example.
89
+ # end
90
+ # end
91
+ #
92
+ # Note that filtered config `:context` hooks can still be applied
93
+ # to individual examples that have matching metadata. Just like
94
+ # Ruby's object model is that every object has a singleton class
95
+ # which has only a single instance, RSpec's model is that every
96
+ # example has a singleton example group containing just the one
97
+ # example.
98
+ #
99
+ # ### Warning: `before(:suite, :with => :conditions)`
100
+ #
101
+ # The conditions hash is used to match against specific examples. Since
102
+ # `before(:suite)` is not run in relation to any specific example or
103
+ # group, conditions passed along with `:suite` are effectively ignored.
104
+ #
105
+ # ### Exceptions
106
+ #
107
+ # When an exception is raised in a `before` block, RSpec skips any
108
+ # subsequent `before` blocks and the example, but runs all of the
109
+ # `after(:example)` and `after(:context)` hooks.
110
+ #
111
+ # ### Warning: implicit before blocks
112
+ #
113
+ # `before` hooks can also be declared in shared contexts which get
114
+ # included implicitly either by you or by extension libraries. Since
115
+ # RSpec runs these in the order in which they are declared within each
116
+ # scope, load order matters, and can lead to confusing results when one
117
+ # before block depends on state that is prepared in another before block
118
+ # that gets run later.
119
+ #
120
+ # ### Warning: `before(:context)`
121
+ #
122
+ # It is very tempting to use `before(:context)` to speed things up, but we
123
+ # recommend that you avoid this as there are a number of gotchas, as well
124
+ # as things that simply don't work.
125
+ #
126
+ # #### Context
127
+ #
128
+ # `before(:context)` is run in an example that is generated to provide
129
+ # group context for the block.
130
+ #
131
+ # #### Instance variables
132
+ #
133
+ # Instance variables declared in `before(:context)` are shared across all
134
+ # the examples in the group. This means that each example can change the
135
+ # state of a shared object, resulting in an ordering dependency that can
136
+ # make it difficult to reason about failures.
137
+ #
138
+ # #### Unsupported RSpec constructs
139
+ #
140
+ # RSpec has several constructs that reset state between each example
141
+ # automatically. These are not intended for use from within
142
+ # `before(:context)`:
143
+ #
144
+ # * `let` declarations
145
+ # * `subject` declarations
146
+ # * Any mocking, stubbing or test double declaration
147
+ #
148
+ # ### other frameworks
149
+ #
150
+ # Mock object frameworks and database transaction managers (like
151
+ # ActiveRecord) are typically designed around the idea of setting up
152
+ # before an example, running that one example, and then tearing down. This
153
+ # means that mocks and stubs can (sometimes) be declared in
154
+ # `before(:context)`, but get torn down before the first real example is
155
+ # ever run.
156
+ #
157
+ # You _can_ create database-backed model objects in a `before(:context)`
158
+ # in rspec-rails, but it will not be wrapped in a transaction for you, so
159
+ # you are on your own to clean up in an `after(:context)` block.
160
+ #
161
+ # @example before(:example) declared in an {ExampleGroup}
162
+ #
163
+ # RSpec.describe Thing do
164
+ # before(:example) do
165
+ # @thing = Thing.new
166
+ # end
167
+ #
168
+ # it "does something" do
169
+ # # Here you can access @thing.
170
+ # end
171
+ # end
172
+ #
173
+ # @example before(:context) declared in an {ExampleGroup}
174
+ #
175
+ # RSpec.describe Parser do
176
+ # before(:context) do
177
+ # File.open(file_to_parse, 'w') do |f|
178
+ # f.write <<-CONTENT
179
+ # stuff in the file
180
+ # CONTENT
181
+ # end
182
+ # end
183
+ #
184
+ # it "parses the file" do
185
+ # Parser.parse(file_to_parse)
186
+ # end
187
+ #
188
+ # after(:context) do
189
+ # File.delete(file_to_parse)
190
+ # end
191
+ # end
192
+ #
193
+ # @note The `:example` and `:context` scopes are also available as
194
+ # `:each` and `:all`, respectively. Use whichever you prefer.
195
+ # @note The `:suite` scope is only supported for hooks registered on
196
+ # `RSpec.configuration` since they exist independently of any
197
+ # example or example group.
198
+ def before(*args, &block)
199
+ hooks.register :append, :before, *args, &block
200
+ end
201
+
202
+ alias_method :append_before, :before
203
+
204
+ # Adds `block` to the front of the list of `before` blocks in the same
205
+ # scope (`:example`, `:context`, or `:suite`).
206
+ #
207
+ # See {#before} for scoping semantics.
208
+ def prepend_before(*args, &block)
209
+ hooks.register :prepend, :before, *args, &block
210
+ end
211
+
212
+ # @api public
213
+ # @overload after(&block)
214
+ # @overload after(scope, &block)
215
+ # @param scope [Symbol] `:example`, `:context`, or `:suite` (defaults to
216
+ # `:example`)
217
+ # @overload after(scope, conditions, &block)
218
+ # @param scope [Symbol] `:example`, `:context`, or `:suite` (defaults to
219
+ # `:example`)
220
+ # @param conditions [Hash]
221
+ # constrains this hook to examples matching these conditions e.g.
222
+ # `after(:example, :ui => true) { ... }` will only run with examples
223
+ # or groups declared with `:ui => true`.
224
+ # @overload after(conditions, &block)
225
+ # @param conditions [Hash]
226
+ # constrains this hook to examples matching these conditions e.g.
227
+ # `after(:example, :ui => true) { ... }` will only run with examples
228
+ # or groups declared with `:ui => true`.
229
+ #
230
+ # @see #before
231
+ # @see #around
232
+ # @see ExampleGroup
233
+ # @see SharedContext
234
+ # @see SharedExampleGroup
235
+ # @see Configuration
236
+ #
237
+ # Declare a block of code to be run after each example (using `:example`)
238
+ # or once after all examples n the context (using `:context`). See
239
+ # {#before} for more information about ordering.
240
+ #
241
+ # ### Exceptions
242
+ #
243
+ # `after` hooks are guaranteed to run even when there are exceptions in
244
+ # `before` hooks or examples. When an exception is raised in an after
245
+ # block, the exception is captured for later reporting, and subsequent
246
+ # `after` blocks are run.
247
+ #
248
+ # ### Order
249
+ #
250
+ # `after` hooks are stored in three scopes, which are run in order:
251
+ # `:example`, `:context`, and `:suite`. They can also be declared in
252
+ # several different places: `RSpec.configure`, a parent group, the current
253
+ # group. They are run in the following order:
254
+ #
255
+ # after(:example) # Declared in the current group.
256
+ # after(:example) # Declared in a parent group.
257
+ # after(:example) # Declared in RSpec.configure.
258
+ # after(:context) # Declared in the current group.
259
+ # after(:context) # Declared in a parent group.
260
+ # after(:context) # Declared in RSpec.configure.
261
+ # after(:suite) # Declared in RSpec.configure.
262
+ #
263
+ # This is the reverse of the order in which `before` hooks are run.
264
+ # Similarly, if more than one `after` is declared within any one scope,
265
+ # they are run in reverse order of that in which they are declared. Also
266
+ # `around` hooks will all have run before any after hooks are invoked.
267
+ #
268
+ # @note The `:example` and `:context` scopes are also available as
269
+ # `:each` and `:all`, respectively. Use whichever you prefer.
270
+ # @note The `:suite` scope is only supported for hooks registered on
271
+ # `RSpec.configuration` since they exist independently of any
272
+ # example or example group.
273
+ def after(*args, &block)
274
+ hooks.register :prepend, :after, *args, &block
275
+ end
276
+
277
+ alias_method :prepend_after, :after
278
+
279
+ # Adds `block` to the back of the list of `after` blocks in the same
280
+ # scope (`:example`, `:context`, or `:suite`).
281
+ #
282
+ # See {#after} for scoping semantics.
283
+ def append_after(*args, &block)
284
+ hooks.register :append, :after, *args, &block
285
+ end
286
+
287
+ # @api public
288
+ # @overload around(&block)
289
+ # @overload around(scope, &block)
290
+ # @param scope [Symbol] `:example` (defaults to `:example`)
291
+ # present for syntax parity with `before` and `after`, but
292
+ # `:example`/`:each` is the only supported value.
293
+ # @overload around(scope, conditions, &block)
294
+ # @param scope [Symbol] `:example` (defaults to `:example`)
295
+ # present for syntax parity with `before` and `after`, but
296
+ # `:example`/`:each` is the only supported value.
297
+ # @param conditions [Hash] constrains this hook to examples matching
298
+ # these conditions e.g. `around(:example, :ui => true) { ... }` will
299
+ # only run with examples or groups declared with `:ui => true`.
300
+ # @overload around(conditions, &block)
301
+ # @param conditions [Hash] constrains this hook to examples matching
302
+ # these conditions e.g. `around(:example, :ui => true) { ... }` will
303
+ # only run with examples or groups declared with `:ui => true`.
304
+ #
305
+ # @yield [Example] the example to run
306
+ #
307
+ # @note the syntax of `around` is similar to that of `before` and `after`
308
+ # but the semantics are quite different. `before` and `after` hooks are
309
+ # run in the context of of the examples with which they are associated,
310
+ # whereas `around` hooks are actually responsible for running the
311
+ # examples. Consequently, `around` hooks do not have direct access to
312
+ # resources that are made available within the examples and their
313
+ # associated `before` and `after` hooks.
314
+ #
315
+ # @note `:example`/`:each` is the only supported scope.
316
+ #
317
+ # Declare a block of code, parts of which will be run before and parts
318
+ # after the example. It is your responsibility to run the example:
319
+ #
320
+ # around(:example) do |ex|
321
+ # # Do some stuff before.
322
+ # ex.run
323
+ # # Do some stuff after.
324
+ # end
325
+ #
326
+ # The yielded example aliases `run` with `call`, which lets you treat it
327
+ # like a `Proc`. This is especially handy when working with libraries
328
+ # that manage their own setup and teardown using a block or proc syntax,
329
+ # e.g.
330
+ #
331
+ # around(:example) {|ex| Database.transaction(&ex)}
332
+ # around(:example) {|ex| FakeFS(&ex)}
333
+ #
334
+ # ### Order
335
+ #
336
+ # All `around` hooks execute immediately surrounding an example, this means
337
+ # that all `before` hooks will have run and no `after` hooks will have run yet.
338
+ #
339
+ # They are not a synonym for `before`/`after`.
340
+ def around(*args, &block)
341
+ hooks.register :prepend, :around, *args, &block
342
+ end
343
+
344
+ # @private
345
+ # Holds the various registered hooks.
346
+ def hooks
347
+ @hooks ||= HookCollections.new(self, FilterableItemRepository::UpdateOptimized)
348
+ end
349
+
350
+ # @private
351
+ Hook = Struct.new(:block, :options)
352
+
353
+ # @private
354
+ class BeforeHook < Hook
355
+ def run(example)
356
+ example.instance_exec(example, &block)
357
+ end
358
+ end
359
+
360
+ # @private
361
+ class AfterHook < Hook
362
+ def run(example)
363
+ example.instance_exec(example, &block)
364
+ rescue Support::AllExceptionsExceptOnesWeMustNotRescue => ex
365
+ example.set_exception(ex)
366
+ end
367
+ end
368
+
369
+ # @private
370
+ class AfterContextHook < Hook
371
+ def run(example)
372
+ example.instance_exec(example, &block)
373
+ rescue Support::AllExceptionsExceptOnesWeMustNotRescue => e
374
+ RSpec.configuration.reporter.notify_non_example_exception(e, "An error occurred in an `after(:context)` hook.")
375
+ end
376
+ end
377
+
378
+ # @private
379
+ class AroundHook < Hook
380
+ def execute_with(example, procsy)
381
+ example.instance_exec(procsy, &block)
382
+ return if procsy.executed?
383
+ Pending.mark_skipped!(example,
384
+ "#{hook_description} did not execute the example")
385
+ end
386
+
387
+ if Proc.method_defined?(:source_location)
388
+ def hook_description
389
+ "around hook at #{Metadata.relative_path(block.source_location.join(':'))}"
390
+ end
391
+ else # for 1.8.7
392
+ # :nocov:
393
+ def hook_description
394
+ "around hook"
395
+ end
396
+ # :nocov:
397
+ end
398
+ end
399
+
400
+ # @private
401
+ #
402
+ # This provides the primary API used by other parts of rspec-core. By hiding all
403
+ # implementation details behind this facade, it's allowed us to heavily optimize
404
+ # this, so that, for example, hook collection objects are only instantiated when
405
+ # a hook is added. This allows us to avoid many object allocations for the common
406
+ # case of a group having no hooks.
407
+ #
408
+ # This is only possible because this interface provides a "tell, don't ask"-style
409
+ # API, so that callers _tell_ this class what to do with the hooks, rather than
410
+ # asking this class for a list of hooks, and then doing something with them.
411
+ class HookCollections
412
+ def initialize(owner, filterable_item_repo_class)
413
+ @owner = owner
414
+ @filterable_item_repo_class = filterable_item_repo_class
415
+ @before_example_hooks = nil
416
+ @after_example_hooks = nil
417
+ @before_context_hooks = nil
418
+ @after_context_hooks = nil
419
+ @around_example_hooks = nil
420
+ end
421
+
422
+ def register_globals(host, globals)
423
+ parent_groups = host.parent_groups
424
+
425
+ process(host, parent_groups, globals, :before, :example, &:options)
426
+ process(host, parent_groups, globals, :after, :example, &:options)
427
+ process(host, parent_groups, globals, :around, :example, &:options)
428
+
429
+ process(host, parent_groups, globals, :before, :context, &:options)
430
+ process(host, parent_groups, globals, :after, :context, &:options)
431
+ end
432
+
433
+ def register_global_singleton_context_hooks(example, globals)
434
+ parent_groups = example.example_group.parent_groups
435
+
436
+ process(example, parent_groups, globals, :before, :context) { {} }
437
+ process(example, parent_groups, globals, :after, :context) { {} }
438
+ end
439
+
440
+ def register(prepend_or_append, position, *args, &block)
441
+ scope, options = scope_and_options_from(*args)
442
+
443
+ if scope == :suite
444
+ # TODO: consider making this an error in RSpec 4. For SemVer reasons,
445
+ # we are only warning in RSpec 3.
446
+ RSpec.warn_with "WARNING: `#{position}(:suite)` hooks are only supported on " \
447
+ "the RSpec configuration object. This " \
448
+ "`#{position}(:suite)` hook, registered on an example " \
449
+ "group, will be ignored."
450
+ return
451
+ end
452
+
453
+ hook = HOOK_TYPES[position][scope].new(block, options)
454
+ ensure_hooks_initialized_for(position, scope).__send__(prepend_or_append, hook, options)
455
+ end
456
+
457
+ # @private
458
+ #
459
+ # Runs all of the blocks stored with the hook in the context of the
460
+ # example. If no example is provided, just calls the hook directly.
461
+ def run(position, scope, example_or_group)
462
+ return if RSpec.configuration.dry_run?
463
+
464
+ if scope == :context
465
+ unless example_or_group.class.metadata[:skip]
466
+ run_owned_hooks_for(position, :context, example_or_group)
467
+ end
468
+ else
469
+ case position
470
+ when :before then run_example_hooks_for(example_or_group, :before, :reverse_each)
471
+ when :after then run_example_hooks_for(example_or_group, :after, :each)
472
+ when :around then run_around_example_hooks_for(example_or_group) { yield }
473
+ end
474
+ end
475
+ end
476
+
477
+ SCOPES = [:example, :context]
478
+
479
+ SCOPE_ALIASES = { :each => :example, :all => :context }
480
+
481
+ HOOK_TYPES = {
482
+ :before => Hash.new { BeforeHook },
483
+ :after => Hash.new { AfterHook },
484
+ :around => Hash.new { AroundHook }
485
+ }
486
+
487
+ HOOK_TYPES[:after][:context] = AfterContextHook
488
+
489
+ protected
490
+
491
+ EMPTY_HOOK_ARRAY = [].freeze
492
+
493
+ def matching_hooks_for(position, scope, example_or_group)
494
+ repository = hooks_for(position, scope) { return EMPTY_HOOK_ARRAY }
495
+
496
+ # It would be nice to not have to switch on type here, but
497
+ # we don't want to define `ExampleGroup#metadata` because then
498
+ # `metadata` from within an individual example would return the
499
+ # group's metadata but the user would probably expect it to be
500
+ # the example's metadata.
501
+ metadata = case example_or_group
502
+ when ExampleGroup then example_or_group.class.metadata
503
+ else example_or_group.metadata
504
+ end
505
+
506
+ repository.items_for(metadata)
507
+ end
508
+
509
+ def all_hooks_for(position, scope)
510
+ hooks_for(position, scope) { return EMPTY_HOOK_ARRAY }.items_and_filters.map(&:first)
511
+ end
512
+
513
+ def run_owned_hooks_for(position, scope, example_or_group)
514
+ matching_hooks_for(position, scope, example_or_group).each do |hook|
515
+ hook.run(example_or_group)
516
+ end
517
+ end
518
+
519
+ def processable_hooks_for(position, scope, host)
520
+ if scope == :example
521
+ all_hooks_for(position, scope)
522
+ else
523
+ matching_hooks_for(position, scope, host)
524
+ end
525
+ end
526
+
527
+ private
528
+
529
+ def hooks_for(position, scope)
530
+ if position == :before
531
+ scope == :example ? @before_example_hooks : @before_context_hooks
532
+ elsif position == :after
533
+ scope == :example ? @after_example_hooks : @after_context_hooks
534
+ else # around
535
+ @around_example_hooks
536
+ end || yield
537
+ end
538
+
539
+ def ensure_hooks_initialized_for(position, scope)
540
+ if position == :before
541
+ if scope == :example
542
+ @before_example_hooks ||= @filterable_item_repo_class.new(:all?)
543
+ else
544
+ @before_context_hooks ||= @filterable_item_repo_class.new(:all?)
545
+ end
546
+ elsif position == :after
547
+ if scope == :example
548
+ @after_example_hooks ||= @filterable_item_repo_class.new(:all?)
549
+ else
550
+ @after_context_hooks ||= @filterable_item_repo_class.new(:all?)
551
+ end
552
+ else # around
553
+ @around_example_hooks ||= @filterable_item_repo_class.new(:all?)
554
+ end
555
+ end
556
+
557
+ def process(host, parent_groups, globals, position, scope)
558
+ hooks_to_process = globals.processable_hooks_for(position, scope, host)
559
+ return if hooks_to_process.empty?
560
+
561
+ hooks_to_process -= FlatMap.flat_map(parent_groups) do |group|
562
+ group.hooks.all_hooks_for(position, scope)
563
+ end
564
+ return if hooks_to_process.empty?
565
+
566
+ repository = ensure_hooks_initialized_for(position, scope)
567
+ hooks_to_process.each { |hook| repository.append hook, (yield hook) }
568
+ end
569
+
570
+ def scope_and_options_from(*args)
571
+ return :suite if args.first == :suite
572
+ scope = extract_scope_from(args)
573
+ meta = Metadata.build_hash_from(args, :warn_about_example_group_filtering)
574
+ return scope, meta
575
+ end
576
+
577
+ def extract_scope_from(args)
578
+ if known_scope?(args.first)
579
+ normalized_scope_for(args.shift)
580
+ elsif args.any? { |a| a.is_a?(Symbol) }
581
+ error_message = "You must explicitly give a scope " \
582
+ "(#{SCOPES.join(", ")}) or scope alias " \
583
+ "(#{SCOPE_ALIASES.keys.join(", ")}) when using symbols as " \
584
+ "metadata for a hook."
585
+ raise ArgumentError.new error_message
586
+ else
587
+ :example
588
+ end
589
+ end
590
+
591
+ def known_scope?(scope)
592
+ SCOPES.include?(scope) || SCOPE_ALIASES.keys.include?(scope)
593
+ end
594
+
595
+ def normalized_scope_for(scope)
596
+ SCOPE_ALIASES[scope] || scope
597
+ end
598
+
599
+ def run_example_hooks_for(example, position, each_method)
600
+ owner_parent_groups.__send__(each_method) do |group|
601
+ group.hooks.run_owned_hooks_for(position, :example, example)
602
+ end
603
+ end
604
+
605
+ def run_around_example_hooks_for(example)
606
+ hooks = FlatMap.flat_map(owner_parent_groups) do |group|
607
+ group.hooks.matching_hooks_for(:around, :example, example)
608
+ end
609
+
610
+ return yield if hooks.empty? # exit early to avoid the extra allocation cost of `Example::Procsy`
611
+
612
+ initial_procsy = Example::Procsy.new(example) { yield }
613
+ hooks.inject(initial_procsy) do |procsy, around_hook|
614
+ procsy.wrap { around_hook.execute_with(example, procsy) }
615
+ end.call
616
+ end
617
+
618
+ if respond_to?(:singleton_class) && singleton_class.ancestors.include?(singleton_class)
619
+ def owner_parent_groups
620
+ @owner.parent_groups
621
+ end
622
+ else # Ruby < 2.1 (see https://bugs.ruby-lang.org/issues/8035)
623
+ # :nocov:
624
+ def owner_parent_groups
625
+ @owner_parent_groups ||= [@owner] + @owner.parent_groups
626
+ end
627
+ # :nocov:
628
+ end
629
+ end
630
+ end
631
+ end
632
+ end