takuya-lvm-snapshot 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (380) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +4 -0
  4. data/Gemfile +10 -0
  5. data/LICENSE +674 -0
  6. data/README.md +80 -0
  7. data/Rakefile +4 -0
  8. data/bin/console +15 -0
  9. data/bin/setup +8 -0
  10. data/bundle/ruby/2.7.0/bin/htmldiff +29 -0
  11. data/bundle/ruby/2.7.0/bin/ldiff +29 -0
  12. data/bundle/ruby/2.7.0/bin/rake +27 -0
  13. data/bundle/ruby/2.7.0/bin/rspec +27 -0
  14. data/bundle/ruby/2.7.0/cache/diff-lcs-1.5.0.gem +0 -0
  15. data/bundle/ruby/2.7.0/cache/rake-13.0.3.gem +0 -0
  16. data/bundle/ruby/2.7.0/cache/rspec-3.12.0.gem +0 -0
  17. data/bundle/ruby/2.7.0/cache/rspec-core-3.12.0.gem +0 -0
  18. data/bundle/ruby/2.7.0/cache/rspec-expectations-3.12.1.gem +0 -0
  19. data/bundle/ruby/2.7.0/cache/rspec-mocks-3.12.1.gem +0 -0
  20. data/bundle/ruby/2.7.0/cache/rspec-support-3.12.0.gem +0 -0
  21. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/.rspec +1 -0
  22. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/Code-of-Conduct.md +74 -0
  23. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/Contributing.md +119 -0
  24. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/History.md +400 -0
  25. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/License.md +39 -0
  26. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/Manifest.txt +59 -0
  27. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/README.rdoc +84 -0
  28. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/Rakefile +121 -0
  29. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/bin/htmldiff +35 -0
  30. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/bin/ldiff +9 -0
  31. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/docs/COPYING.txt +339 -0
  32. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/docs/artistic.txt +127 -0
  33. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/lib/diff/lcs/array.rb +7 -0
  34. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/lib/diff/lcs/backports.rb +9 -0
  35. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/lib/diff/lcs/block.rb +37 -0
  36. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/lib/diff/lcs/callbacks.rb +325 -0
  37. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/lib/diff/lcs/change.rb +174 -0
  38. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/lib/diff/lcs/htmldiff.rb +150 -0
  39. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/lib/diff/lcs/hunk.rb +358 -0
  40. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/lib/diff/lcs/internals.rb +308 -0
  41. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/lib/diff/lcs/ldiff.rb +171 -0
  42. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/lib/diff/lcs/string.rb +5 -0
  43. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/lib/diff/lcs.rb +739 -0
  44. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/lib/diff-lcs.rb +3 -0
  45. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/change_spec.rb +89 -0
  46. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/diff_spec.rb +51 -0
  47. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/aX +1 -0
  48. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/bXaX +1 -0
  49. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ds1.csv +50 -0
  50. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ds2.csv +51 -0
  51. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff +4 -0
  52. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff-c +7 -0
  53. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff-e +3 -0
  54. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff-f +3 -0
  55. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff-u +5 -0
  56. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef +4 -0
  57. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef-c +15 -0
  58. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef-e +3 -0
  59. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef-f +3 -0
  60. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef-u +9 -0
  61. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2 +7 -0
  62. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-c +20 -0
  63. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-d +7 -0
  64. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-e +7 -0
  65. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-f +7 -0
  66. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/ldiff/output.diff.chef2-u +16 -0
  67. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/new-chef +4 -0
  68. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/new-chef2 +17 -0
  69. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/old-chef +4 -0
  70. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/fixtures/old-chef2 +14 -0
  71. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/hunk_spec.rb +83 -0
  72. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/issues_spec.rb +154 -0
  73. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/lcs_spec.rb +56 -0
  74. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/ldiff_spec.rb +87 -0
  75. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/patch_spec.rb +416 -0
  76. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/sdiff_spec.rb +214 -0
  77. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/spec_helper.rb +374 -0
  78. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/traverse_balanced_spec.rb +310 -0
  79. data/bundle/ruby/2.7.0/gems/diff-lcs-1.5.0/spec/traverse_sequences_spec.rb +137 -0
  80. data/bundle/ruby/2.7.0/gems/rake-13.0.3/CONTRIBUTING.rdoc +43 -0
  81. data/bundle/ruby/2.7.0/gems/rake-13.0.3/Gemfile +10 -0
  82. data/bundle/ruby/2.7.0/gems/rake-13.0.3/History.rdoc +2386 -0
  83. data/bundle/ruby/2.7.0/gems/rake-13.0.3/MIT-LICENSE +21 -0
  84. data/bundle/ruby/2.7.0/gems/rake-13.0.3/README.rdoc +155 -0
  85. data/bundle/ruby/2.7.0/gems/rake-13.0.3/Rakefile +41 -0
  86. data/bundle/ruby/2.7.0/gems/rake-13.0.3/bin/bundle +105 -0
  87. data/bundle/ruby/2.7.0/gems/rake-13.0.3/bin/console +7 -0
  88. data/bundle/ruby/2.7.0/gems/rake-13.0.3/bin/rake +29 -0
  89. data/bundle/ruby/2.7.0/gems/rake-13.0.3/bin/rdoc +29 -0
  90. data/bundle/ruby/2.7.0/gems/rake-13.0.3/bin/rubocop +29 -0
  91. data/bundle/ruby/2.7.0/gems/rake-13.0.3/bin/setup +6 -0
  92. data/bundle/ruby/2.7.0/gems/rake-13.0.3/doc/command_line_usage.rdoc +158 -0
  93. data/bundle/ruby/2.7.0/gems/rake-13.0.3/doc/example/Rakefile1 +38 -0
  94. data/bundle/ruby/2.7.0/gems/rake-13.0.3/doc/example/Rakefile2 +35 -0
  95. data/bundle/ruby/2.7.0/gems/rake-13.0.3/doc/example/a.c +6 -0
  96. data/bundle/ruby/2.7.0/gems/rake-13.0.3/doc/example/b.c +6 -0
  97. data/bundle/ruby/2.7.0/gems/rake-13.0.3/doc/example/main.c +11 -0
  98. data/bundle/ruby/2.7.0/gems/rake-13.0.3/doc/glossary.rdoc +42 -0
  99. data/bundle/ruby/2.7.0/gems/rake-13.0.3/doc/jamis.rb +592 -0
  100. data/bundle/ruby/2.7.0/gems/rake-13.0.3/doc/proto_rake.rdoc +127 -0
  101. data/bundle/ruby/2.7.0/gems/rake-13.0.3/doc/rake.1 +156 -0
  102. data/bundle/ruby/2.7.0/gems/rake-13.0.3/doc/rakefile.rdoc +622 -0
  103. data/bundle/ruby/2.7.0/gems/rake-13.0.3/doc/rational.rdoc +151 -0
  104. data/bundle/ruby/2.7.0/gems/rake-13.0.3/exe/rake +27 -0
  105. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb +824 -0
  106. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/backtrace.rb +24 -0
  107. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/clean.rb +78 -0
  108. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/cloneable.rb +17 -0
  109. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/cpu_counter.rb +107 -0
  110. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/default_loader.rb +15 -0
  111. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/dsl_definition.rb +195 -0
  112. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/early_time.rb +22 -0
  113. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/ext/core.rb +26 -0
  114. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/ext/string.rb +176 -0
  115. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/file_creation_task.rb +25 -0
  116. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/file_list.rb +435 -0
  117. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/file_task.rb +54 -0
  118. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/file_utils.rb +134 -0
  119. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/file_utils_ext.rb +134 -0
  120. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/invocation_chain.rb +57 -0
  121. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/invocation_exception_mixin.rb +17 -0
  122. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/late_time.rb +18 -0
  123. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/linked_list.rb +112 -0
  124. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/loaders/makefile.rb +54 -0
  125. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/multi_task.rb +14 -0
  126. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/name_space.rb +38 -0
  127. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/packagetask.rb +222 -0
  128. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/phony.rb +16 -0
  129. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/private_reader.rb +21 -0
  130. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/promise.rb +100 -0
  131. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/pseudo_status.rb +30 -0
  132. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/rake_module.rb +67 -0
  133. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/rake_test_loader.rb +27 -0
  134. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/rule_recursion_overflow_error.rb +20 -0
  135. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/scope.rb +43 -0
  136. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task.rb +434 -0
  137. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task_argument_error.rb +8 -0
  138. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task_arguments.rb +109 -0
  139. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/task_manager.rb +331 -0
  140. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/tasklib.rb +12 -0
  141. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/testtask.rb +189 -0
  142. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/thread_history_display.rb +49 -0
  143. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/thread_pool.rb +163 -0
  144. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/trace_output.rb +23 -0
  145. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/version.rb +10 -0
  146. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/win32.rb +51 -0
  147. data/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake.rb +71 -0
  148. data/bundle/ruby/2.7.0/gems/rake-13.0.3/rake.gemspec +43 -0
  149. data/bundle/ruby/2.7.0/gems/rspec-3.12.0/LICENSE.md +27 -0
  150. data/bundle/ruby/2.7.0/gems/rspec-3.12.0/README.md +47 -0
  151. data/bundle/ruby/2.7.0/gems/rspec-3.12.0/lib/rspec/version.rb +5 -0
  152. data/bundle/ruby/2.7.0/gems/rspec-3.12.0/lib/rspec.rb +3 -0
  153. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/.document +5 -0
  154. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/.yardopts +8 -0
  155. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/Changelog.md +2360 -0
  156. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/LICENSE.md +26 -0
  157. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/README.md +384 -0
  158. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/exe/rspec +4 -0
  159. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/autorun.rb +3 -0
  160. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/backtrace_formatter.rb +65 -0
  161. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/coordinator.rb +62 -0
  162. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/example_minimizer.rb +173 -0
  163. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/fork_runner.rb +138 -0
  164. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/server.rb +61 -0
  165. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/shell_command.rb +126 -0
  166. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/shell_runner.rb +73 -0
  167. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/bisect/utilities.rb +69 -0
  168. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb +2385 -0
  169. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration_options.rb +233 -0
  170. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/did_you_mean.rb +46 -0
  171. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/drb.rb +120 -0
  172. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/dsl.rb +98 -0
  173. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/example.rb +666 -0
  174. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/example_group.rb +905 -0
  175. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/example_status_persister.rb +235 -0
  176. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/filter_manager.rb +231 -0
  177. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/flat_map.rb +20 -0
  178. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/base_bisect_formatter.rb +45 -0
  179. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
  180. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
  181. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_drb_formatter.rb +29 -0
  182. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +157 -0
  183. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/console_codes.rb +76 -0
  184. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
  185. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/documentation_formatter.rb +102 -0
  186. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/exception_presenter.rb +525 -0
  187. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/failure_list_formatter.rb +23 -0
  188. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
  189. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/helpers.rb +118 -0
  190. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/html_formatter.rb +153 -0
  191. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/html_printer.rb +412 -0
  192. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
  193. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/json_formatter.rb +102 -0
  194. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
  195. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/progress_formatter.rb +29 -0
  196. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/protocol.rb +182 -0
  197. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
  198. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
  199. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters.rb +279 -0
  200. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/hooks.rb +646 -0
  201. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/invocations.rb +87 -0
  202. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/memoized_helpers.rb +580 -0
  203. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/metadata.rb +498 -0
  204. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/metadata_filter.rb +255 -0
  205. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
  206. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
  207. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
  208. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
  209. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
  210. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
  211. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/notifications.rb +521 -0
  212. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/option_parser.rb +323 -0
  213. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/ordering.rb +169 -0
  214. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/output_wrapper.rb +29 -0
  215. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/pending.rb +157 -0
  216. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/profiler.rb +34 -0
  217. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/project_initializer/.rspec +1 -0
  218. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +98 -0
  219. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/project_initializer.rb +48 -0
  220. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/rake_task.rb +188 -0
  221. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/reporter.rb +265 -0
  222. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/ruby_project.rb +53 -0
  223. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/runner.rb +212 -0
  224. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/sandbox.rb +37 -0
  225. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/set.rb +54 -0
  226. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/shared_context.rb +55 -0
  227. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/shared_example_group.rb +271 -0
  228. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/shell_escape.rb +49 -0
  229. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
  230. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/version.rb +9 -0
  231. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/warnings.rb +40 -0
  232. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core/world.rb +287 -0
  233. data/bundle/ruby/2.7.0/gems/rspec-core-3.12.0/lib/rspec/core.rb +212 -0
  234. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/.document +5 -0
  235. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/.yardopts +6 -0
  236. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/Changelog.md +1294 -0
  237. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/LICENSE.md +25 -0
  238. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/README.md +320 -0
  239. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
  240. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/configuration.rb +230 -0
  241. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/expectation_target.rb +163 -0
  242. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/fail_with.rb +39 -0
  243. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/failure_aggregator.rb +229 -0
  244. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/handler.rb +182 -0
  245. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/minitest_integration.rb +58 -0
  246. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/syntax.rb +132 -0
  247. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations/version.rb +8 -0
  248. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/expectations.rb +82 -0
  249. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/aliased_matcher.rb +116 -0
  250. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/all.rb +86 -0
  251. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/base_matcher.rb +198 -0
  252. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/be.rb +191 -0
  253. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/be_between.rb +77 -0
  254. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/be_instance_of.rb +26 -0
  255. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/be_kind_of.rb +20 -0
  256. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/be_within.rb +72 -0
  257. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/change.rb +450 -0
  258. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/compound.rb +290 -0
  259. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/contain_exactly.rb +310 -0
  260. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/count_expectation.rb +169 -0
  261. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/cover.rb +24 -0
  262. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/eq.rb +40 -0
  263. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/eql.rb +34 -0
  264. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/equal.rb +81 -0
  265. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/exist.rb +90 -0
  266. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/has.rb +167 -0
  267. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  268. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/include.rb +206 -0
  269. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/match.rb +106 -0
  270. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/operators.rb +128 -0
  271. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/output.rb +207 -0
  272. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/raise_error.rb +271 -0
  273. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/respond_to.rb +200 -0
  274. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/satisfy.rb +60 -0
  275. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  276. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/throw_symbol.rb +138 -0
  277. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in/yield.rb +375 -0
  278. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/built_in.rb +53 -0
  279. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/composable.rb +171 -0
  280. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/dsl.rb +545 -0
  281. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/english_phrasing.rb +58 -0
  282. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +82 -0
  283. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/fail_matchers.rb +42 -0
  284. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/generated_descriptions.rb +41 -0
  285. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/matcher_delegator.rb +35 -0
  286. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers/matcher_protocol.rb +105 -0
  287. data/bundle/ruby/2.7.0/gems/rspec-expectations-3.12.1/lib/rspec/matchers.rb +1044 -0
  288. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/.document +5 -0
  289. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/.yardopts +6 -0
  290. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/Changelog.md +1227 -0
  291. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/LICENSE.md +25 -0
  292. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/README.md +463 -0
  293. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/any_instance/chain.rb +111 -0
  294. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
  295. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
  296. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
  297. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
  298. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/any_instance/proxy.rb +116 -0
  299. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/any_instance/recorder.rb +295 -0
  300. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
  301. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
  302. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/any_instance.rb +11 -0
  303. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/argument_list_matcher.rb +115 -0
  304. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/argument_matchers.rb +322 -0
  305. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/configuration.rb +212 -0
  306. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/error_generator.rb +390 -0
  307. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/example_methods.rb +434 -0
  308. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/instance_method_stasher.rb +146 -0
  309. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/marshal_extension.rb +41 -0
  310. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
  311. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/matchers/have_received.rb +134 -0
  312. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/matchers/receive.rb +133 -0
  313. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
  314. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
  315. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/message_chain.rb +87 -0
  316. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/message_expectation.rb +820 -0
  317. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/method_double.rb +309 -0
  318. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/method_reference.rb +214 -0
  319. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/minitest_integration.rb +68 -0
  320. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/mutate_const.rb +339 -0
  321. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/object_reference.rb +149 -0
  322. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/order_group.rb +81 -0
  323. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/proxy.rb +519 -0
  324. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/space.rb +238 -0
  325. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/standalone.rb +3 -0
  326. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/syntax.rb +325 -0
  327. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/targets.rb +124 -0
  328. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/test_double.rb +171 -0
  329. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/verifying_double.rb +121 -0
  330. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/verifying_message_expectation.rb +55 -0
  331. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/verifying_proxy.rb +220 -0
  332. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks/version.rb +9 -0
  333. data/bundle/ruby/2.7.0/gems/rspec-mocks-3.12.1/lib/rspec/mocks.rb +133 -0
  334. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/Changelog.md +364 -0
  335. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/LICENSE.md +23 -0
  336. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/README.md +40 -0
  337. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/caller_filter.rb +83 -0
  338. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/comparable_version.rb +46 -0
  339. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/differ.rb +215 -0
  340. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/directory_maker.rb +63 -0
  341. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/encoded_string.rb +161 -0
  342. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
  343. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/hunk_generator.rb +47 -0
  344. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/matcher_definition.rb +42 -0
  345. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/method_signature_verifier.rb +438 -0
  346. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/mutex.rb +73 -0
  347. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/object_formatter.rb +275 -0
  348. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/recursive_const_methods.rb +76 -0
  349. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/reentrant_mutex.rb +78 -0
  350. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/ruby_features.rb +198 -0
  351. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/source/location.rb +21 -0
  352. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/source/node.rb +110 -0
  353. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/source/token.rb +94 -0
  354. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/source.rb +85 -0
  355. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/deprecation_helpers.rb +48 -0
  356. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/diff_helpers.rb +31 -0
  357. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/formatting_support.rb +9 -0
  358. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/in_sub_process.rb +67 -0
  359. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/library_wide_checks.rb +150 -0
  360. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/shell_out.rb +105 -0
  361. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/stderr_splitter.rb +75 -0
  362. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/string_matcher.rb +45 -0
  363. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
  364. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
  365. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/spec.rb +82 -0
  366. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/version.rb +7 -0
  367. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/warnings.rb +39 -0
  368. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support/with_keywords_when_needed.rb +33 -0
  369. data/bundle/ruby/2.7.0/gems/rspec-support-3.12.0/lib/rspec/support.rb +154 -0
  370. data/bundle/ruby/2.7.0/specifications/diff-lcs-1.5.0.gemspec +50 -0
  371. data/bundle/ruby/2.7.0/specifications/rake-13.0.3.gemspec +26 -0
  372. data/bundle/ruby/2.7.0/specifications/rspec-3.12.0.gemspec +39 -0
  373. data/bundle/ruby/2.7.0/specifications/rspec-core-3.12.0.gemspec +53 -0
  374. data/bundle/ruby/2.7.0/specifications/rspec-expectations-3.12.1.gemspec +44 -0
  375. data/bundle/ruby/2.7.0/specifications/rspec-mocks-3.12.1.gemspec +44 -0
  376. data/bundle/ruby/2.7.0/specifications/rspec-support-3.12.0.gemspec +36 -0
  377. data/lib/takuya/lvm_snapshot/version.rb +7 -0
  378. data/lib/takuya/lvm_snapshot.rb +111 -0
  379. data/takuya-lvm-snapshot.gemspec +34 -0
  380. metadata +424 -0
@@ -0,0 +1,25 @@
1
+ The MIT License (MIT)
2
+ =====================
3
+
4
+ * Copyright © 2012 David Chelimsky, Myron Marston
5
+ * Copyright © 2006 David Chelimsky, The RSpec Development Team
6
+ * Copyright © 2005 Steven Baker
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining
9
+ a copy of this software and associated documentation files (the
10
+ "Software"), to deal in the Software without restriction, including
11
+ without limitation the rights to use, copy, modify, merge, publish,
12
+ distribute, sublicense, and/or sell copies of the Software, and to
13
+ permit persons to whom the Software is furnished to do so, subject to
14
+ the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be
17
+ included in all copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,463 @@
1
+ # RSpec Mocks [![Build Status](https://github.com/rspec/rspec-mocks/workflows/RSpec%20CI/badge.svg)](https://github.com/rspec/rspec-mocks/actions) [![Code Climate](https://codeclimate.com/github/rspec/rspec-mocks.svg)](https://codeclimate.com/github/rspec/rspec-mocks)
2
+ rspec-mocks is a test-double framework for rspec with support for method stubs,
3
+ fakes, and message expectations on generated test-doubles and real objects
4
+ alike.
5
+
6
+ ## Install
7
+
8
+ gem install rspec # for rspec-core, rspec-expectations, rspec-mocks
9
+ gem install rspec-mocks # for rspec-mocks only
10
+
11
+ Want to run against the `main` branch? You'll need to include the dependent
12
+ RSpec repos as well. Add the following to your `Gemfile`:
13
+
14
+ ```ruby
15
+ %w[rspec-core rspec-expectations rspec-mocks rspec-support].each do |lib|
16
+ gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => 'main'
17
+ end
18
+ ```
19
+ ## Contributing
20
+
21
+ Once you've set up the environment, you'll need to cd into the working
22
+ directory of whichever repo you want to work in. From there you can run the
23
+ specs and cucumber features, and make patches.
24
+
25
+ NOTE: You do not need to use rspec-dev to work on a specific RSpec repo. You
26
+ can treat each RSpec repo as an independent project.
27
+
28
+ For information about contributing to RSpec, please refer to the following markdown files:
29
+ * [Build details](BUILD_DETAIL.md)
30
+ * [Code of Conduct](CODE_OF_CONDUCT.md)
31
+ * [Detailed contributing guide](CONTRIBUTING.md)
32
+ * [Development setup guide](DEVELOPMENT.md)
33
+
34
+ ## Test Doubles
35
+
36
+ A test double is an object that stands in for another object in your system
37
+ during a code example. Use the `double` method, passing in an optional identifier, to create one:
38
+
39
+ ```ruby
40
+ book = double("book")
41
+ ```
42
+
43
+ Most of the time you will want some confidence that your doubles resemble an
44
+ existing object in your system. Verifying doubles are provided for this
45
+ purpose. If the existing object is available, they will prevent you from adding
46
+ stubs and expectations for methods that do not exist or that have an invalid
47
+ number of parameters.
48
+
49
+ ```ruby
50
+ book = instance_double("Book", :pages => 250)
51
+ ```
52
+
53
+ Verifying doubles have some clever tricks to enable you to both test in
54
+ isolation without your dependencies loaded while still being able to validate
55
+ them against real objects. More detail is available in [their
56
+ documentation](https://github.com/rspec/rspec-mocks/blob/main/features/verifying_doubles).
57
+
58
+ Verifying doubles can also accept custom identifiers, just like double(), e.g.:
59
+
60
+ ```ruby
61
+ books = []
62
+ books << instance_double("Book", :rspec_book, :pages => 250)
63
+ books << instance_double("Book", "(Untitled)", :pages => 5000)
64
+
65
+ puts books.inspect # with names, it's clearer which were actually added
66
+ ```
67
+
68
+ ## Method Stubs
69
+
70
+ A method stub is an implementation that returns a pre-determined value. Method
71
+ stubs can be declared on test doubles or real objects using the same syntax.
72
+ rspec-mocks supports 3 forms for declaring method stubs:
73
+
74
+ ```ruby
75
+ allow(book).to receive(:title) { "The RSpec Book" }
76
+ allow(book).to receive(:title).and_return("The RSpec Book")
77
+ allow(book).to receive_messages(
78
+ :title => "The RSpec Book",
79
+ :subtitle => "Behaviour-Driven Development with RSpec, Cucumber, and Friends")
80
+ ```
81
+
82
+ You can also use this shortcut, which creates a test double and declares a
83
+ method stub in one statement:
84
+
85
+ ```ruby
86
+ book = double("book", :title => "The RSpec Book")
87
+ ```
88
+
89
+ The first argument is a name, which is used for documentation and appears in
90
+ failure messages. If you don't care about the name, you can leave it out,
91
+ making the combined instantiation/stub declaration very terse:
92
+
93
+ ```ruby
94
+ double(:foo => 'bar')
95
+ ```
96
+
97
+ This is particularly nice when providing a list of test doubles to a method
98
+ that iterates through them:
99
+
100
+ ```ruby
101
+ order.calculate_total_price(double(:price => 1.99), double(:price => 2.99))
102
+ ```
103
+
104
+ ### Stubbing a chain of methods
105
+
106
+ You can use `receive_message_chain` in place of `receive` to stub a chain of messages:
107
+
108
+ ```ruby
109
+ allow(double).to receive_message_chain("foo.bar") { :baz }
110
+ allow(double).to receive_message_chain(:foo, :bar => :baz)
111
+ allow(double).to receive_message_chain(:foo, :bar) { :baz }
112
+
113
+ # Given any of the above forms:
114
+ double.foo.bar # => :baz
115
+ ```
116
+
117
+ Chains can be arbitrarily long, which makes it quite painless to violate the Law of Demeter in violent ways, so you should consider any use of `receive_message_chain` a code smell. Even though not all code smells indicate real problems (think fluent interfaces), `receive_message_chain` still results in brittle examples. For example, if you write `allow(foo).to receive_message_chain(:bar, :baz => 37)` in a spec and then the implementation calls `foo.baz.bar`, the stub will not work.
118
+
119
+ ## Consecutive return values
120
+
121
+ When a stub might be invoked more than once, you can provide additional
122
+ arguments to `and_return`. The invocations cycle through the list. The last
123
+ value is returned for any subsequent invocations:
124
+
125
+ ```ruby
126
+ allow(die).to receive(:roll).and_return(1, 2, 3)
127
+ die.roll # => 1
128
+ die.roll # => 2
129
+ die.roll # => 3
130
+ die.roll # => 3
131
+ die.roll # => 3
132
+ ```
133
+
134
+ To return an array in a single invocation, declare an array:
135
+
136
+ ```ruby
137
+ allow(team).to receive(:players).and_return([double(:name => "David")])
138
+ ```
139
+
140
+ ## Message Expectations
141
+
142
+ A message expectation is an expectation that the test double will receive a
143
+ message some time before the example ends. If the message is received, the
144
+ expectation is satisfied. If not, the example fails.
145
+
146
+ ```ruby
147
+ validator = double("validator")
148
+ expect(validator).to receive(:validate) { "02134" }
149
+ zipcode = Zipcode.new("02134", validator)
150
+ zipcode.valid?
151
+ ```
152
+
153
+ ## Test Spies
154
+
155
+ Verifies the given object received the expected message during the course of
156
+ the test. For a message to be verified, the given object must be setup to spy
157
+ on it, either by having it explicitly stubbed or by being a null object double
158
+ (e.g. `double(...).as_null_object`). Convenience methods are provided to easily
159
+ create null object doubles for this purpose:
160
+
161
+ ```ruby
162
+ spy("invitation") # => same as `double("invitation").as_null_object`
163
+ instance_spy("Invitation") # => same as `instance_double("Invitation").as_null_object`
164
+ class_spy("Invitation") # => same as `class_double("Invitation").as_null_object`
165
+ object_spy("Invitation") # => same as `object_double("Invitation").as_null_object`
166
+ ```
167
+
168
+ Verifying messages received in this way implements the Test Spy pattern.
169
+
170
+ ```ruby
171
+ invitation = spy('invitation')
172
+
173
+ user.accept_invitation(invitation)
174
+
175
+ expect(invitation).to have_received(:accept)
176
+
177
+ # You can also use other common message expectations. For example:
178
+ expect(invitation).to have_received(:accept).with(mailer)
179
+ expect(invitation).to have_received(:accept).twice
180
+ expect(invitation).to_not have_received(:accept).with(mailer)
181
+
182
+ # One can specify a return value on the spy the same way one would a double.
183
+ invitation = spy('invitation', :accept => true)
184
+ expect(invitation).to have_received(:accept).with(mailer)
185
+ expect(invitation.accept).to eq(true)
186
+ ```
187
+
188
+ Note that `have_received(...).with(...)` is unable to work properly when
189
+ passed arguments are mutated after the spy records the received message.
190
+ For example, this does not work properly:
191
+
192
+ ```ruby
193
+ greeter = spy("greeter")
194
+
195
+ message = "Hello"
196
+ greeter.greet_with(message)
197
+ message << ", World"
198
+
199
+ expect(greeter).to have_received(:greet_with).with("Hello")
200
+ ```
201
+
202
+ ## Nomenclature
203
+
204
+ ### Mock Objects and Test Stubs
205
+
206
+ The names Mock Object and Test Stub suggest specialized Test Doubles. i.e.
207
+ a Test Stub is a Test Double that only supports method stubs, and a Mock
208
+ Object is a Test Double that supports message expectations and method
209
+ stubs.
210
+
211
+ There is a lot of overlapping nomenclature here, and there are many
212
+ variations of these patterns (fakes, spies, etc). Keep in mind that most of
213
+ the time we're talking about method-level concepts that are variations of
214
+ method stubs and message expectations, and we're applying to them to _one_
215
+ generic kind of object: a Test Double.
216
+
217
+ ### Test-Specific Extension
218
+
219
+ a.k.a. Partial Double, a Test-Specific Extension is an extension of a
220
+ real object in a system that is instrumented with test-double like
221
+ behaviour in the context of a test. This technique is very common in Ruby
222
+ because we often see class objects acting as global namespaces for methods.
223
+ For example, in Rails:
224
+
225
+ ```ruby
226
+ person = double("person")
227
+ allow(Person).to receive(:find) { person }
228
+ ```
229
+
230
+ In this case we're instrumenting Person to return the person object we've
231
+ defined whenever it receives the `find` message. We can also set a message
232
+ expectation so that the example fails if `find` is not called:
233
+
234
+ ```ruby
235
+ person = double("person")
236
+ expect(Person).to receive(:find) { person }
237
+ ```
238
+
239
+ RSpec replaces the method we're stubbing or mocking with its own
240
+ test-double-like method. At the end of the example, RSpec verifies any message
241
+ expectations, and then restores the original methods.
242
+
243
+ ## Expecting Arguments
244
+
245
+ ```ruby
246
+ expect(double).to receive(:msg).with(*args)
247
+ expect(double).to_not receive(:msg).with(*args)
248
+ ```
249
+
250
+ You can set multiple expectations for the same message if you need to:
251
+
252
+ ```ruby
253
+ expect(double).to receive(:msg).with("A", 1, 3)
254
+ expect(double).to receive(:msg).with("B", 2, 4)
255
+ ```
256
+
257
+ ## Argument Matchers
258
+
259
+ Arguments that are passed to `with` are compared with actual arguments
260
+ received using ===. In cases in which you want to specify things about the
261
+ arguments rather than the arguments themselves, you can use any of the
262
+ matchers that ship with rspec-expectations. They don't all make syntactic
263
+ sense (they were primarily designed for use with RSpec::Expectations), but
264
+ you are free to create your own custom RSpec::Matchers.
265
+
266
+ rspec-mocks also adds some keyword Symbols that you can use to
267
+ specify certain kinds of arguments:
268
+
269
+ ```ruby
270
+ expect(double).to receive(:msg).with(no_args)
271
+ expect(double).to receive(:msg).with(any_args)
272
+ expect(double).to receive(:msg).with(1, any_args) # any args acts like an arg splat and can go anywhere
273
+ expect(double).to receive(:msg).with(1, kind_of(Numeric), "b") #2nd argument can be any kind of Numeric
274
+ expect(double).to receive(:msg).with(1, boolean(), "b") #2nd argument can be true or false
275
+ expect(double).to receive(:msg).with(1, /abc/, "b") #2nd argument can be any String matching the submitted Regexp
276
+ expect(double).to receive(:msg).with(1, anything(), "b") #2nd argument can be anything at all
277
+ expect(double).to receive(:msg).with(1, duck_type(:abs, :div), "b") #2nd argument can be object that responds to #abs and #div
278
+ expect(double).to receive(:msg).with(hash_including(:a => 5)) # first arg is a hash with a: 5 as one of the key-values
279
+ expect(double).to receive(:msg).with(array_including(5)) # first arg is an array with 5 as one of the key-values
280
+ expect(double).to receive(:msg).with(hash_excluding(:a => 5)) # first arg is a hash without a: 5 as one of the key-values
281
+ ```
282
+
283
+ ## Receive Counts
284
+
285
+ ```ruby
286
+ expect(double).to receive(:msg).once
287
+ expect(double).to receive(:msg).twice
288
+ expect(double).to receive(:msg).exactly(n).time
289
+ expect(double).to receive(:msg).exactly(n).times
290
+ expect(double).to receive(:msg).at_least(:once)
291
+ expect(double).to receive(:msg).at_least(:twice)
292
+ expect(double).to receive(:msg).at_least(n).time
293
+ expect(double).to receive(:msg).at_least(n).times
294
+ expect(double).to receive(:msg).at_most(:once)
295
+ expect(double).to receive(:msg).at_most(:twice)
296
+ expect(double).to receive(:msg).at_most(n).time
297
+ expect(double).to receive(:msg).at_most(n).times
298
+ ```
299
+
300
+ ## Ordering
301
+
302
+ ```ruby
303
+ expect(double).to receive(:msg).ordered
304
+ expect(double).to receive(:other_msg).ordered
305
+ # This will fail if the messages are received out of order
306
+ ```
307
+
308
+ This can include the same message with different arguments:
309
+
310
+ ```ruby
311
+ expect(double).to receive(:msg).with("A", 1, 3).ordered
312
+ expect(double).to receive(:msg).with("B", 2, 4).ordered
313
+ ```
314
+
315
+ ## Setting Responses
316
+
317
+ Whether you are setting a message expectation or a method stub, you can
318
+ tell the object precisely how to respond. The most generic way is to pass
319
+ a block to `receive`:
320
+
321
+ ```ruby
322
+ expect(double).to receive(:msg) { value }
323
+ ```
324
+
325
+ When the double receives the `msg` message, it evaluates the block and returns
326
+ the result.
327
+
328
+ ```ruby
329
+ expect(double).to receive(:msg).and_return(value)
330
+ expect(double).to receive(:msg).exactly(3).times.and_return(value1, value2, value3)
331
+ # returns value1 the first time, value2 the second, etc
332
+ expect(double).to receive(:msg).and_raise(error)
333
+ # `error` can be an instantiated object (e.g. `StandardError.new(some_arg)`) or a class (e.g. `StandardError`)
334
+ # if it is a class, it must be instantiable with no args
335
+ expect(double).to receive(:msg).and_throw(:msg)
336
+ expect(double).to receive(:msg).and_yield(values, to, yield)
337
+ expect(double).to receive(:msg).and_yield(values, to, yield).and_yield(some, other, values, this, time)
338
+ # for methods that yield to a block multiple times
339
+ ```
340
+
341
+ Any of these responses can be applied to a stub as well
342
+
343
+ ```ruby
344
+ allow(double).to receive(:msg).and_return(value)
345
+ allow(double).to receive(:msg).and_return(value1, value2, value3)
346
+ allow(double).to receive(:msg).and_raise(error)
347
+ allow(double).to receive(:msg).and_throw(:msg)
348
+ allow(double).to receive(:msg).and_yield(values, to, yield)
349
+ allow(double).to receive(:msg).and_yield(values, to, yield).and_yield(some, other, values, this, time)
350
+ ```
351
+
352
+ ## Arbitrary Handling
353
+
354
+ Once in a while you'll find that the available expectations don't solve the
355
+ particular problem you are trying to solve. Imagine that you expect the message
356
+ to come with an Array argument that has a specific length, but you don't care
357
+ what is in it. You could do this:
358
+
359
+ ```ruby
360
+ expect(double).to receive(:msg) do |arg|
361
+ expect(arg.size).to eq 7
362
+ end
363
+ ```
364
+
365
+ If the method being stubbed itself takes a block, and you need to yield to it
366
+ in some special way, you can use this:
367
+
368
+ ```ruby
369
+ expect(double).to receive(:msg) do |&arg|
370
+ begin
371
+ arg.call
372
+ ensure
373
+ # cleanup
374
+ end
375
+ end
376
+ ```
377
+
378
+ ## Delegating to the Original Implementation
379
+
380
+ When working with a partial mock object, you may occasionally
381
+ want to set a message expectation without interfering with how
382
+ the object responds to the message. You can use `and_call_original`
383
+ to achieve this:
384
+
385
+ ```ruby
386
+ expect(Person).to receive(:find).and_call_original
387
+ Person.find # => executes the original find method and returns the result
388
+ ```
389
+
390
+ ## Combining Expectation Details
391
+
392
+ Combining the message name with specific arguments, receive counts and responses
393
+ you can get quite a bit of detail in your expectations:
394
+
395
+ ```ruby
396
+ expect(double).to receive(:<<).with("illegal value").once.and_raise(ArgumentError)
397
+ ```
398
+
399
+ While this is a good thing when you really need it, you probably don't really
400
+ need it! Take care to specify only the things that matter to the behavior of
401
+ your code.
402
+
403
+ ## Stubbing and Hiding Constants
404
+
405
+ See the [mutating constants
406
+ README](https://github.com/rspec/rspec-mocks/blob/main/features/mutating_constants/README.md)
407
+ for info on this feature.
408
+
409
+ ## Use `before(:example)`, not `before(:context)`
410
+
411
+ Stubs in `before(:context)` are not supported. The reason is that all stubs and mocks get cleared out after each example, so any stub that is set in `before(:context)` would work in the first example that happens to run in that group, but not for any others.
412
+
413
+ Instead of `before(:context)`, use `before(:example)`.
414
+
415
+ ## Settings mocks or stubs on any instance of a class
416
+
417
+ rspec-mocks provides two methods, `allow_any_instance_of` and
418
+ `expect_any_instance_of`, that will allow you to stub or mock any instance
419
+ of a class. They are used in place of `allow` or `expect`:
420
+
421
+ ```ruby
422
+ allow_any_instance_of(Widget).to receive(:name).and_return("Wibble")
423
+ expect_any_instance_of(Widget).to receive(:name).and_return("Wobble")
424
+ ```
425
+
426
+ These methods add the appropriate stub or expectation to all instances of
427
+ `Widget`.
428
+
429
+ This feature is sometimes useful when working with legacy code, though in
430
+ general we discourage its use for a number of reasons:
431
+
432
+ * The `rspec-mocks` API is designed for individual object instances, but this
433
+ feature operates on entire classes of objects. As a result there are some
434
+ semantically confusing edge cases. For example in
435
+ `expect_any_instance_of(Widget).to receive(:name).twice` it isn't clear
436
+ whether each specific instance is expected to receive `name` twice, or if two
437
+ receives total are expected. (It's the former.)
438
+ * Using this feature is often a design smell. It may be
439
+ that your test is trying to do too much or that the object under test is too
440
+ complex.
441
+ * It is the most complicated feature of `rspec-mocks`, and has historically
442
+ received the most bug reports. (None of the core team actively use it,
443
+ which doesn't help.)
444
+
445
+
446
+ ## Further Reading
447
+
448
+ There are many different viewpoints about the meaning of mocks and stubs. If
449
+ you are interested in learning more, here is some recommended reading:
450
+
451
+ * Mock Objects: http://www.mockobjects.com/
452
+ * Endo-Testing: http://www.ccs.neu.edu/research/demeter/related-work/extreme-programming/MockObjectsFinal.PDF
453
+ * Mock Roles, Not Objects: http://www.jmock.org/oopsla2004.pdf
454
+ * Test Double: http://www.martinfowler.com/bliki/TestDouble.html
455
+ * Test Double Patterns: http://xunitpatterns.com/Test%20Double%20Patterns.html
456
+ * Mocks aren't stubs: http://www.martinfowler.com/articles/mocksArentStubs.html
457
+
458
+ ## Also see
459
+
460
+ * [https://github.com/rspec/rspec](https://github.com/rspec/rspec)
461
+ * [https://github.com/rspec/rspec-core](https://github.com/rspec/rspec-core)
462
+ * [https://github.com/rspec/rspec-expectations](https://github.com/rspec/rspec-expectations)
463
+ * [https://github.com/rspec/rspec-rails](https://github.com/rspec/rspec-rails)
@@ -0,0 +1,111 @@
1
+ module RSpec
2
+ module Mocks
3
+ # @private
4
+ module AnyInstance
5
+ # @private
6
+ class Chain
7
+ def initialize(recorder, *args, &block)
8
+ @recorder = recorder
9
+ @expectation_args = args
10
+ @expectation_block = block
11
+ @argument_list_matcher = ArgumentListMatcher::MATCH_ALL
12
+ end
13
+
14
+ # @private
15
+ #
16
+ # Provides convenience methods for recording customizations on message
17
+ # expectations.
18
+ module Customizations
19
+ # @macro [attach] record
20
+ # @method $1(*args, &block)
21
+ # Records the `$1` message for playback against an instance that
22
+ # invokes a method stubbed or mocked using `any_instance`.
23
+ #
24
+ # @see RSpec::Mocks::MessageExpectation#$1
25
+ #
26
+ def self.record(method_name)
27
+ define_method(method_name) do |*args, &block|
28
+ record(method_name, *args, &block)
29
+ end
30
+ end
31
+
32
+ record :and_return
33
+ record :and_raise
34
+ record :and_throw
35
+ record :and_yield
36
+ record :and_call_original
37
+ record :and_wrap_original
38
+ record :with
39
+ record :once
40
+ record :twice
41
+ record :thrice
42
+ record :exactly
43
+ record :times
44
+ record :time
45
+ record :never
46
+ record :at_least
47
+ record :at_most
48
+ end
49
+
50
+ include Customizations
51
+
52
+ # @private
53
+ def playback!(instance)
54
+ message_expectation = create_message_expectation_on(instance)
55
+ messages.inject(message_expectation) do |object, message|
56
+ object.__send__(*message.first, &message.last)
57
+ end
58
+ end
59
+
60
+ # @private
61
+ def constrained_to_any_of?(*constraints)
62
+ constraints.any? do |constraint|
63
+ messages.any? do |message|
64
+ message.first.first == constraint
65
+ end
66
+ end
67
+ end
68
+
69
+ # @private
70
+ def matches_args?(*args)
71
+ @argument_list_matcher.args_match?(*args)
72
+ end
73
+
74
+ # @private
75
+ def expectation_fulfilled!
76
+ @expectation_fulfilled = true
77
+ end
78
+
79
+ def never
80
+ AnyInstance.error_generator.raise_double_negation_error("expect_any_instance_of(MyClass)") if negated?
81
+ super
82
+ end
83
+
84
+ def with(*args, &block)
85
+ @argument_list_matcher = ArgumentListMatcher.new(*args)
86
+ super
87
+ end
88
+
89
+ private
90
+
91
+ def negated?
92
+ messages.any? { |(message, *_), _| message == :never }
93
+ end
94
+
95
+ def messages
96
+ @messages ||= []
97
+ end
98
+
99
+ def last_message
100
+ messages.last.first.first unless messages.empty?
101
+ end
102
+
103
+ def record(rspec_method_name, *args, &block)
104
+ verify_invocation_order(rspec_method_name, *args, &block)
105
+ messages << [args.unshift(rspec_method_name), block]
106
+ self
107
+ end
108
+ end
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,31 @@
1
+ module RSpec
2
+ module Mocks
3
+ module AnyInstance
4
+ # @private
5
+ class ErrorGenerator < ::RSpec::Mocks::ErrorGenerator
6
+ def raise_second_instance_received_message_error(unfulfilled_expectations)
7
+ __raise "Exactly one instance should have received the following " \
8
+ "message(s) but didn't: #{unfulfilled_expectations.sort.join(', ')}"
9
+ end
10
+
11
+ def raise_does_not_implement_error(klass, method_name)
12
+ __raise "#{klass} does not implement ##{method_name}"
13
+ end
14
+
15
+ def raise_message_already_received_by_other_instance_error(method_name, object_inspect, invoked_instance)
16
+ __raise "The message '#{method_name}' was received by #{object_inspect} " \
17
+ "but has already been received by #{invoked_instance}"
18
+ end
19
+
20
+ def raise_not_supported_with_prepend_error(method_name, problem_mod)
21
+ __raise "Using `any_instance` to stub a method (#{method_name}) that has been " \
22
+ "defined on a prepended module (#{problem_mod}) is not supported."
23
+ end
24
+ end
25
+
26
+ def self.error_generator
27
+ @error_generator ||= ErrorGenerator.new
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,31 @@
1
+ module RSpec
2
+ module Mocks
3
+ module AnyInstance
4
+ # @private
5
+ class ExpectChainChain < StubChain
6
+ def initialize(*args)
7
+ super
8
+ @expectation_fulfilled = false
9
+ end
10
+
11
+ def expectation_fulfilled?
12
+ @expectation_fulfilled
13
+ end
14
+
15
+ def playback!(instance)
16
+ super.tap { @expectation_fulfilled = true }
17
+ end
18
+
19
+ private
20
+
21
+ def create_message_expectation_on(instance)
22
+ ::RSpec::Mocks::ExpectChain.expect_chain_on(instance, *@expectation_args, &@expectation_block)
23
+ end
24
+
25
+ def invocation_order
26
+ EmptyInvocationOrder
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end