win32-api 1.4.8 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (564) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGES +212 -144
  3. data/Dockerfile +99 -0
  4. data/Dockerfile.trunk +17 -0
  5. data/Gemfile +4 -0
  6. data/Gemfile.lock +24 -0
  7. data/MANIFEST +9 -9
  8. data/{README → README.md} +136 -106
  9. data/RELEASE.md +32 -0
  10. data/Rakefile +261 -128
  11. data/appveyor.yml +46 -0
  12. data/build-gem.bat +3 -0
  13. data/ext/Makefile +267 -0
  14. data/ext/api-x64-mingw32.def +2 -0
  15. data/ext/api.o +0 -0
  16. data/ext/api.so +0 -0
  17. data/ext/extconf.rb +15 -11
  18. data/ext/mkmf.log +38 -0
  19. data/ext/win32/api.c +1102 -949
  20. data/ext/win32/api.so +0 -0
  21. data/test.rb +10 -0
  22. data/test/test_win32_api.rb +145 -148
  23. data/test/test_win32_api_callback.rb +74 -74
  24. data/test/test_win32_api_function.rb +66 -66
  25. data/vendor/bundle/ruby/2.5.0/bin/rake +27 -0
  26. data/vendor/bundle/ruby/2.5.0/bin/rake-compiler-dock +27 -0
  27. data/vendor/bundle/ruby/2.5.0/bin/rake-compiler-dock.bat +6 -0
  28. data/vendor/bundle/ruby/2.5.0/bin/rake.bat +6 -0
  29. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/BSDL +22 -0
  30. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/COPYING +57 -0
  31. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/Gemfile +9 -0
  32. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/LEGAL +4 -0
  33. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/README.rdoc +81 -0
  34. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/Rakefile +59 -0
  35. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/bin/console +12 -0
  36. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/bin/setup +6 -0
  37. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/lib/power_assert.rb +98 -0
  38. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/lib/power_assert/colorize.rb +9 -0
  39. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/lib/power_assert/configuration.rb +46 -0
  40. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/lib/power_assert/context.rb +235 -0
  41. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/lib/power_assert/enable_tracepoint_events.rb +91 -0
  42. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/lib/power_assert/inspector.rb +61 -0
  43. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/lib/power_assert/parser.rb +251 -0
  44. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/lib/power_assert/version.rb +3 -0
  45. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.5/power_assert.gemspec +31 -0
  46. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/BSDL +22 -0
  47. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/COPYING +57 -0
  48. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/Gemfile +9 -0
  49. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/LEGAL +4 -0
  50. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/README.rdoc +81 -0
  51. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/Rakefile +59 -0
  52. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/bin/console +12 -0
  53. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/bin/setup +6 -0
  54. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/lib/power_assert.rb +98 -0
  55. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/lib/power_assert/colorize.rb +9 -0
  56. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/lib/power_assert/configuration.rb +46 -0
  57. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/lib/power_assert/context.rb +238 -0
  58. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/lib/power_assert/enable_tracepoint_events.rb +91 -0
  59. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/lib/power_assert/inspector.rb +61 -0
  60. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/lib/power_assert/parser.rb +251 -0
  61. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/lib/power_assert/version.rb +3 -0
  62. data/vendor/bundle/ruby/2.5.0/gems/power_assert-1.1.7/power_assert.gemspec +31 -0
  63. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/CONTRIBUTING.rdoc +43 -0
  64. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/Gemfile +10 -0
  65. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/History.rdoc +2368 -0
  66. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/MIT-LICENSE +21 -0
  67. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/README.rdoc +155 -0
  68. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/Rakefile +41 -0
  69. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/bin/bundle +105 -0
  70. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/bin/console +7 -0
  71. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/bin/rake +29 -0
  72. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/bin/rdoc +29 -0
  73. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/bin/rubocop +29 -0
  74. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/bin/setup +6 -0
  75. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/doc/command_line_usage.rdoc +158 -0
  76. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/doc/example/Rakefile1 +38 -0
  77. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/doc/example/Rakefile2 +35 -0
  78. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/doc/example/a.c +6 -0
  79. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/doc/example/b.c +6 -0
  80. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/doc/example/main.c +11 -0
  81. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/doc/glossary.rdoc +42 -0
  82. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/doc/jamis.rb +592 -0
  83. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/doc/proto_rake.rdoc +127 -0
  84. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/doc/rake.1 +156 -0
  85. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/doc/rakefile.rdoc +622 -0
  86. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/doc/rational.rdoc +151 -0
  87. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/exe/rake +27 -0
  88. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake.rb +71 -0
  89. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/application.rb +824 -0
  90. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/backtrace.rb +24 -0
  91. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/clean.rb +78 -0
  92. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/cloneable.rb +17 -0
  93. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/cpu_counter.rb +107 -0
  94. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/default_loader.rb +15 -0
  95. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/dsl_definition.rb +195 -0
  96. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/early_time.rb +22 -0
  97. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/ext/core.rb +26 -0
  98. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/ext/string.rb +176 -0
  99. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/file_creation_task.rb +25 -0
  100. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/file_list.rb +435 -0
  101. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/file_task.rb +54 -0
  102. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/file_utils.rb +134 -0
  103. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/file_utils_ext.rb +134 -0
  104. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/invocation_chain.rb +57 -0
  105. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/invocation_exception_mixin.rb +17 -0
  106. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/late_time.rb +18 -0
  107. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/linked_list.rb +112 -0
  108. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/loaders/makefile.rb +54 -0
  109. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/multi_task.rb +14 -0
  110. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/name_space.rb +38 -0
  111. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/packagetask.rb +222 -0
  112. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/phony.rb +16 -0
  113. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/private_reader.rb +21 -0
  114. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/promise.rb +100 -0
  115. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/pseudo_status.rb +30 -0
  116. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/rake_module.rb +67 -0
  117. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb +27 -0
  118. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
  119. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/scope.rb +43 -0
  120. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/task.rb +434 -0
  121. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/task_argument_error.rb +8 -0
  122. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/task_arguments.rb +109 -0
  123. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/task_manager.rb +331 -0
  124. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/tasklib.rb +12 -0
  125. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/testtask.rb +224 -0
  126. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/thread_history_display.rb +49 -0
  127. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/thread_pool.rb +163 -0
  128. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/trace_output.rb +23 -0
  129. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/version.rb +10 -0
  130. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/win32.rb +51 -0
  131. data/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/rake.gemspec +43 -0
  132. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/Dockerfile.jruby +61 -0
  133. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/Dockerfile.mri +122 -0
  134. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/Gemfile +8 -0
  135. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/History.md +130 -0
  136. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/LICENSE.txt +22 -0
  137. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/README.md +162 -0
  138. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/Rakefile +36 -0
  139. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/bin/rake-compiler-dock +18 -0
  140. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/build/mk_i686.rb +16 -0
  141. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/build/patches/rake-compiler-1.0.7/enable-static.diff +13 -0
  142. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/build/patches/ruby-2.5.3/no_sendfile.patch +24 -0
  143. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/build/runas +12 -0
  144. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/build/sigfw.c +45 -0
  145. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/build/strip_wrapper +30 -0
  146. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/build/sudoers +1 -0
  147. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/lib/rake_compiler_dock.rb +66 -0
  148. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/lib/rake_compiler_dock/colors.rb +43 -0
  149. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/lib/rake_compiler_dock/docker_check.rb +350 -0
  150. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/lib/rake_compiler_dock/gem_helper.rb +73 -0
  151. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/lib/rake_compiler_dock/predefined_user_group.rb +5 -0
  152. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/lib/rake_compiler_dock/starter.rb +155 -0
  153. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/lib/rake_compiler_dock/version.rb +4 -0
  154. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/rake-compiler-dock.gemspec +28 -0
  155. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/test/test_environment_variables.rb +54 -0
  156. data/vendor/bundle/ruby/2.5.0/gems/rake-compiler-dock-0.7.2/test/test_starter.rb +33 -0
  157. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/COPYING +67 -0
  158. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/GPL +339 -0
  159. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/LGPL +502 -0
  160. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/PSFL +271 -0
  161. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/README.md +101 -0
  162. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/Rakefile +80 -0
  163. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/doc/text/getting-started.md +246 -0
  164. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/doc/text/how-to.md +90 -0
  165. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/doc/text/news.md +1453 -0
  166. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test-unit.rb +34 -0
  167. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit.rb +514 -0
  168. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/assertion-failed-error.rb +25 -0
  169. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/assertions.rb +2256 -0
  170. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/attribute-matcher.rb +26 -0
  171. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/attribute.rb +227 -0
  172. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/auto-runner-loader.rb +17 -0
  173. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/autorunner.rb +537 -0
  174. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/code-snippet-fetcher.rb +56 -0
  175. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/collector.rb +73 -0
  176. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/collector/descendant.rb +19 -0
  177. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/collector/dir.rb +108 -0
  178. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/collector/load.rb +197 -0
  179. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/collector/objectspace.rb +34 -0
  180. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/collector/xml.rb +249 -0
  181. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/color-scheme.rb +198 -0
  182. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/color.rb +134 -0
  183. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/data-sets.rb +116 -0
  184. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/data.rb +371 -0
  185. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/diff.rb +746 -0
  186. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/error.rb +158 -0
  187. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/exception-handler.rb +82 -0
  188. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/failure.rb +169 -0
  189. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/fault-location-detector.rb +100 -0
  190. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/fixture.rb +298 -0
  191. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/notification.rb +138 -0
  192. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/omission.rb +198 -0
  193. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/pending.rb +155 -0
  194. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/priority.rb +196 -0
  195. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/runner/console.rb +84 -0
  196. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/runner/emacs.rb +8 -0
  197. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/runner/xml.rb +15 -0
  198. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/test-suite-creator.rb +103 -0
  199. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/testcase.rb +899 -0
  200. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/testresult.rb +132 -0
  201. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/testsuite.rb +175 -0
  202. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/ui/console/outputlevel.rb +15 -0
  203. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/ui/console/testrunner.rb +750 -0
  204. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/ui/emacs/testrunner.rb +49 -0
  205. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/ui/testrunner.rb +53 -0
  206. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/ui/testrunnermediator.rb +114 -0
  207. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  208. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/ui/xml/testrunner.rb +224 -0
  209. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/util/backtracefilter.rb +59 -0
  210. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/util/method-owner-finder.rb +28 -0
  211. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/util/observable.rb +90 -0
  212. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/util/output.rb +32 -0
  213. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/util/procwrapper.rb +48 -0
  214. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/lib/test/unit/version.rb +5 -0
  215. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/sample/adder.rb +13 -0
  216. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/sample/subtracter.rb +12 -0
  217. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/sample/test_adder.rb +20 -0
  218. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/sample/test_subtracter.rb +20 -0
  219. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/sample/test_user.rb +23 -0
  220. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/collector/test-descendant.rb +182 -0
  221. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/collector/test-load.rb +475 -0
  222. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/collector/test_dir.rb +407 -0
  223. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/collector/test_objectspace.rb +102 -0
  224. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/fixtures/header-label.csv +3 -0
  225. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/fixtures/header-label.tsv +3 -0
  226. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/fixtures/header.csv +3 -0
  227. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/fixtures/header.tsv +3 -0
  228. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/fixtures/no-header.csv +2 -0
  229. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/fixtures/no-header.tsv +2 -0
  230. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/fixtures/plus.csv +3 -0
  231. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/run-test.rb +22 -0
  232. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-assertions.rb +2187 -0
  233. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-attribute-matcher.rb +38 -0
  234. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-attribute.rb +123 -0
  235. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-code-snippet.rb +79 -0
  236. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-color-scheme.rb +82 -0
  237. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-color.rb +47 -0
  238. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-data.rb +419 -0
  239. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-diff.rb +518 -0
  240. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-emacs-runner.rb +60 -0
  241. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-error.rb +26 -0
  242. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-failure.rb +33 -0
  243. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-fault-location-detector.rb +163 -0
  244. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-fixture.rb +713 -0
  245. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-notification.rb +33 -0
  246. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-omission.rb +81 -0
  247. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-pending.rb +70 -0
  248. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-priority.rb +184 -0
  249. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-test-case.rb +1279 -0
  250. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-test-result.rb +113 -0
  251. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-test-suite-creator.rb +97 -0
  252. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-test-suite.rb +151 -0
  253. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/testunit-test-util.rb +33 -0
  254. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/ui/test_testrunmediator.rb +20 -0
  255. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/util/test-method-owner-finder.rb +38 -0
  256. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/util/test-output.rb +11 -0
  257. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/util/test_backtracefilter.rb +52 -0
  258. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/util/test_observable.rb +102 -0
  259. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/util/test_procwrapper.rb +36 -0
  260. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/COPYING +67 -0
  261. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/GPL +339 -0
  262. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/LGPL +502 -0
  263. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/PSFL +271 -0
  264. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/README.md +101 -0
  265. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/Rakefile +80 -0
  266. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/doc/text/getting-started.md +246 -0
  267. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/doc/text/how-to.md +90 -0
  268. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/doc/text/news.md +1464 -0
  269. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test-unit.rb +34 -0
  270. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit.rb +514 -0
  271. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/assertion-failed-error.rb +25 -0
  272. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/assertions.rb +2256 -0
  273. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/attribute-matcher.rb +26 -0
  274. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/attribute.rb +227 -0
  275. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/auto-runner-loader.rb +17 -0
  276. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/autorunner.rb +537 -0
  277. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/code-snippet-fetcher.rb +58 -0
  278. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/collector.rb +73 -0
  279. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/collector/descendant.rb +19 -0
  280. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/collector/dir.rb +108 -0
  281. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/collector/load.rb +197 -0
  282. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/collector/objectspace.rb +34 -0
  283. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/collector/xml.rb +249 -0
  284. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/color-scheme.rb +198 -0
  285. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/color.rb +134 -0
  286. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/data-sets.rb +116 -0
  287. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/data.rb +371 -0
  288. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/diff.rb +746 -0
  289. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/error.rb +158 -0
  290. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/exception-handler.rb +82 -0
  291. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/failure.rb +169 -0
  292. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/fault-location-detector.rb +100 -0
  293. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/fixture.rb +298 -0
  294. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/notification.rb +138 -0
  295. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/omission.rb +198 -0
  296. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/pending.rb +155 -0
  297. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/priority.rb +196 -0
  298. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/runner/console.rb +84 -0
  299. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/runner/emacs.rb +8 -0
  300. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/runner/xml.rb +15 -0
  301. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/test-suite-creator.rb +103 -0
  302. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/testcase.rb +899 -0
  303. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/testresult.rb +132 -0
  304. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/testsuite.rb +175 -0
  305. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/ui/console/outputlevel.rb +15 -0
  306. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/ui/console/testrunner.rb +750 -0
  307. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/ui/emacs/testrunner.rb +49 -0
  308. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/ui/testrunner.rb +53 -0
  309. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/ui/testrunnermediator.rb +114 -0
  310. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  311. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/ui/xml/testrunner.rb +224 -0
  312. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/util/backtracefilter.rb +59 -0
  313. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/util/method-owner-finder.rb +28 -0
  314. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/util/observable.rb +90 -0
  315. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/util/output.rb +32 -0
  316. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/util/procwrapper.rb +48 -0
  317. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/lib/test/unit/version.rb +5 -0
  318. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/sample/adder.rb +13 -0
  319. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/sample/subtracter.rb +12 -0
  320. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/sample/test_adder.rb +20 -0
  321. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/sample/test_subtracter.rb +20 -0
  322. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/sample/test_user.rb +23 -0
  323. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/collector/test-descendant.rb +182 -0
  324. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/collector/test-load.rb +475 -0
  325. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/collector/test_dir.rb +407 -0
  326. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/collector/test_objectspace.rb +102 -0
  327. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/fixtures/header-label.csv +3 -0
  328. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/fixtures/header-label.tsv +3 -0
  329. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/fixtures/header.csv +3 -0
  330. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/fixtures/header.tsv +3 -0
  331. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/fixtures/no-header.csv +2 -0
  332. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/fixtures/no-header.tsv +2 -0
  333. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/fixtures/plus.csv +3 -0
  334. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/run-test.rb +22 -0
  335. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-assertions.rb +2187 -0
  336. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-attribute-matcher.rb +38 -0
  337. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-attribute.rb +123 -0
  338. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-code-snippet.rb +79 -0
  339. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-color-scheme.rb +82 -0
  340. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-color.rb +47 -0
  341. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-data.rb +419 -0
  342. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-diff.rb +518 -0
  343. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-emacs-runner.rb +60 -0
  344. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-error.rb +26 -0
  345. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-failure.rb +33 -0
  346. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-fault-location-detector.rb +163 -0
  347. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-fixture.rb +713 -0
  348. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-notification.rb +33 -0
  349. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-omission.rb +81 -0
  350. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-pending.rb +70 -0
  351. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-priority.rb +184 -0
  352. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-test-case.rb +1279 -0
  353. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-test-result.rb +113 -0
  354. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-test-suite-creator.rb +97 -0
  355. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-test-suite.rb +151 -0
  356. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/testunit-test-util.rb +33 -0
  357. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/ui/test_testrunmediator.rb +20 -0
  358. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/util/test-method-owner-finder.rb +38 -0
  359. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/util/test-output.rb +11 -0
  360. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/util/test_backtracefilter.rb +52 -0
  361. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/util/test_observable.rb +102 -0
  362. data/vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/util/test_procwrapper.rb +36 -0
  363. data/vendor/bundle/ruby/2.5.0/specifications/power_assert-1.1.5.gemspec +54 -0
  364. data/vendor/bundle/ruby/2.5.0/specifications/power_assert-1.1.7.gemspec +54 -0
  365. data/vendor/bundle/ruby/2.5.0/specifications/rake-13.0.1.gemspec +26 -0
  366. data/vendor/bundle/ruby/2.5.0/specifications/rake-compiler-dock-0.7.2.gemspec +40 -0
  367. data/vendor/bundle/ruby/2.5.0/specifications/test-unit-3.3.4.gemspec +48 -0
  368. data/vendor/bundle/ruby/2.5.0/specifications/test-unit-3.3.5.gemspec +48 -0
  369. data/vendor/bundle/ruby/2.7.0/bin/rake +27 -0
  370. data/vendor/bundle/ruby/2.7.0/bin/rake.bat +2 -0
  371. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/BSDL +22 -0
  372. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/COPYING +57 -0
  373. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/Gemfile +9 -0
  374. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/LEGAL +4 -0
  375. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/README.rdoc +81 -0
  376. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/Rakefile +59 -0
  377. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/bin/console +12 -0
  378. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/bin/setup +6 -0
  379. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/lib/power_assert.rb +98 -0
  380. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/lib/power_assert/colorize.rb +9 -0
  381. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/lib/power_assert/configuration.rb +46 -0
  382. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/lib/power_assert/context.rb +238 -0
  383. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/lib/power_assert/enable_tracepoint_events.rb +91 -0
  384. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/lib/power_assert/inspector.rb +61 -0
  385. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/lib/power_assert/parser.rb +251 -0
  386. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/lib/power_assert/version.rb +3 -0
  387. data/vendor/bundle/ruby/2.7.0/gems/power_assert-1.1.7/power_assert.gemspec +31 -0
  388. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/CONTRIBUTING.rdoc +43 -0
  389. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/Gemfile +10 -0
  390. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/History.rdoc +2368 -0
  391. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/MIT-LICENSE +21 -0
  392. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/README.rdoc +155 -0
  393. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/Rakefile +41 -0
  394. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/bin/bundle +105 -0
  395. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/bin/console +7 -0
  396. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/bin/rake +29 -0
  397. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/bin/rdoc +29 -0
  398. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/bin/rubocop +29 -0
  399. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/bin/setup +6 -0
  400. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/doc/command_line_usage.rdoc +158 -0
  401. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/doc/example/Rakefile1 +38 -0
  402. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/doc/example/Rakefile2 +35 -0
  403. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/doc/example/a.c +6 -0
  404. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/doc/example/b.c +6 -0
  405. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/doc/example/main.c +11 -0
  406. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/doc/glossary.rdoc +42 -0
  407. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/doc/jamis.rb +592 -0
  408. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/doc/proto_rake.rdoc +127 -0
  409. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/doc/rake.1 +156 -0
  410. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/doc/rakefile.rdoc +622 -0
  411. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/doc/rational.rdoc +151 -0
  412. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/exe/rake +27 -0
  413. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake.rb +71 -0
  414. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb +824 -0
  415. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/backtrace.rb +24 -0
  416. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/clean.rb +78 -0
  417. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/cloneable.rb +17 -0
  418. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/cpu_counter.rb +107 -0
  419. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/default_loader.rb +15 -0
  420. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/dsl_definition.rb +195 -0
  421. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/early_time.rb +22 -0
  422. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/ext/core.rb +26 -0
  423. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/ext/string.rb +176 -0
  424. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/file_creation_task.rb +25 -0
  425. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/file_list.rb +435 -0
  426. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/file_task.rb +54 -0
  427. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/file_utils.rb +134 -0
  428. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/file_utils_ext.rb +134 -0
  429. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/invocation_chain.rb +57 -0
  430. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/invocation_exception_mixin.rb +17 -0
  431. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/late_time.rb +18 -0
  432. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/linked_list.rb +112 -0
  433. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/loaders/makefile.rb +54 -0
  434. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/multi_task.rb +14 -0
  435. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/name_space.rb +38 -0
  436. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/packagetask.rb +222 -0
  437. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/phony.rb +16 -0
  438. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/private_reader.rb +21 -0
  439. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/promise.rb +100 -0
  440. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/pseudo_status.rb +30 -0
  441. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/rake_module.rb +67 -0
  442. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb +27 -0
  443. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
  444. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/scope.rb +43 -0
  445. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task.rb +434 -0
  446. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task_argument_error.rb +8 -0
  447. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task_arguments.rb +109 -0
  448. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/task_manager.rb +331 -0
  449. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/tasklib.rb +12 -0
  450. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/testtask.rb +224 -0
  451. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/thread_history_display.rb +49 -0
  452. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/thread_pool.rb +163 -0
  453. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/trace_output.rb +23 -0
  454. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/version.rb +10 -0
  455. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/win32.rb +51 -0
  456. data/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/rake.gemspec +43 -0
  457. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/COPYING +67 -0
  458. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/GPL +339 -0
  459. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/LGPL +502 -0
  460. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/PSFL +271 -0
  461. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/README.md +101 -0
  462. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/Rakefile +80 -0
  463. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/doc/text/getting-started.md +246 -0
  464. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/doc/text/how-to.md +90 -0
  465. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/doc/text/news.md +1464 -0
  466. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test-unit.rb +34 -0
  467. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit.rb +514 -0
  468. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/assertion-failed-error.rb +25 -0
  469. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/assertions.rb +2256 -0
  470. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/attribute-matcher.rb +26 -0
  471. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/attribute.rb +227 -0
  472. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/auto-runner-loader.rb +17 -0
  473. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/autorunner.rb +537 -0
  474. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/code-snippet-fetcher.rb +58 -0
  475. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/collector.rb +73 -0
  476. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/collector/descendant.rb +19 -0
  477. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/collector/dir.rb +108 -0
  478. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/collector/load.rb +197 -0
  479. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/collector/objectspace.rb +34 -0
  480. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/collector/xml.rb +249 -0
  481. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/color-scheme.rb +198 -0
  482. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/color.rb +134 -0
  483. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/data-sets.rb +116 -0
  484. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/data.rb +371 -0
  485. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/diff.rb +746 -0
  486. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/error.rb +158 -0
  487. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/exception-handler.rb +82 -0
  488. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/failure.rb +169 -0
  489. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/fault-location-detector.rb +100 -0
  490. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/fixture.rb +298 -0
  491. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/notification.rb +138 -0
  492. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/omission.rb +198 -0
  493. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/pending.rb +155 -0
  494. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/priority.rb +196 -0
  495. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/runner/console.rb +84 -0
  496. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/runner/emacs.rb +8 -0
  497. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/runner/xml.rb +15 -0
  498. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/test-suite-creator.rb +103 -0
  499. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/testcase.rb +899 -0
  500. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/testresult.rb +132 -0
  501. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/testsuite.rb +175 -0
  502. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/ui/console/outputlevel.rb +15 -0
  503. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/ui/console/testrunner.rb +750 -0
  504. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/ui/emacs/testrunner.rb +49 -0
  505. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/ui/testrunner.rb +53 -0
  506. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/ui/testrunnermediator.rb +114 -0
  507. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  508. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/ui/xml/testrunner.rb +224 -0
  509. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/util/backtracefilter.rb +59 -0
  510. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/util/method-owner-finder.rb +28 -0
  511. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/util/observable.rb +90 -0
  512. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/util/output.rb +32 -0
  513. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/util/procwrapper.rb +48 -0
  514. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/lib/test/unit/version.rb +5 -0
  515. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/sample/adder.rb +13 -0
  516. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/sample/subtracter.rb +12 -0
  517. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/sample/test_adder.rb +20 -0
  518. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/sample/test_subtracter.rb +20 -0
  519. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/sample/test_user.rb +23 -0
  520. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/collector/test-descendant.rb +182 -0
  521. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/collector/test-load.rb +475 -0
  522. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/collector/test_dir.rb +407 -0
  523. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/collector/test_objectspace.rb +102 -0
  524. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/fixtures/header-label.csv +3 -0
  525. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/fixtures/header-label.tsv +3 -0
  526. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/fixtures/header.csv +3 -0
  527. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/fixtures/header.tsv +3 -0
  528. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/fixtures/no-header.csv +2 -0
  529. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/fixtures/no-header.tsv +2 -0
  530. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/fixtures/plus.csv +3 -0
  531. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/run-test.rb +22 -0
  532. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-assertions.rb +2187 -0
  533. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-attribute-matcher.rb +38 -0
  534. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-attribute.rb +123 -0
  535. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-code-snippet.rb +79 -0
  536. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-color-scheme.rb +82 -0
  537. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-color.rb +47 -0
  538. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-data.rb +419 -0
  539. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-diff.rb +518 -0
  540. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-emacs-runner.rb +60 -0
  541. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-error.rb +26 -0
  542. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-failure.rb +33 -0
  543. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-fault-location-detector.rb +163 -0
  544. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-fixture.rb +713 -0
  545. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-notification.rb +33 -0
  546. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-omission.rb +81 -0
  547. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-pending.rb +70 -0
  548. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-priority.rb +184 -0
  549. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-test-case.rb +1279 -0
  550. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-test-result.rb +113 -0
  551. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-test-suite-creator.rb +97 -0
  552. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-test-suite.rb +151 -0
  553. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/testunit-test-util.rb +33 -0
  554. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/ui/test_testrunmediator.rb +20 -0
  555. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/util/test-method-owner-finder.rb +38 -0
  556. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/util/test-output.rb +11 -0
  557. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/util/test_backtracefilter.rb +52 -0
  558. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/util/test_observable.rb +102 -0
  559. data/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/util/test_procwrapper.rb +36 -0
  560. data/vendor/bundle/ruby/2.7.0/specifications/power_assert-1.1.7.gemspec +46 -0
  561. data/vendor/bundle/ruby/2.7.0/specifications/rake-13.0.1.gemspec +26 -0
  562. data/vendor/bundle/ruby/2.7.0/specifications/test-unit-3.3.5.gemspec +41 -0
  563. data/win32-api.gemspec +27 -29
  564. metadata +610 -63
@@ -0,0 +1,25 @@
1
+ #--
2
+ #
3
+ # Author:: Nathaniel Talbott.
4
+ # Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
5
+ # License:: Ruby license.
6
+
7
+ module Test
8
+ module Unit
9
+
10
+ # Thrown by Test::Unit::Assertions when an assertion fails.
11
+ class AssertionFailedError < StandardError
12
+ attr_accessor :expected, :actual, :user_message
13
+ attr_accessor :inspected_expected, :inspected_actual
14
+ def initialize(message=nil, options=nil)
15
+ options ||= {}
16
+ @expected = options[:expected]
17
+ @actual = options[:actual]
18
+ @inspected_expected = options[:inspected_expected]
19
+ @inspected_actual = options[:inspected_actual]
20
+ @user_message = options[:user_message]
21
+ super(message)
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,2256 @@
1
+ # Author:: Nathaniel Talbott.
2
+ # Copyright:: Copyright (c) 2000-2003 Nathaniel Talbott. All rights reserved.
3
+ # Copyright (c) 2009-2013 Kouhei Sutou. All rights reserved.
4
+ # License:: Ruby license.
5
+
6
+ require 'test/unit/assertion-failed-error'
7
+ require 'test/unit/util/backtracefilter'
8
+ require 'test/unit/util/method-owner-finder'
9
+ require 'test/unit/diff'
10
+
11
+ begin
12
+ require 'power_assert'
13
+ rescue LoadError, SyntaxError
14
+ end
15
+
16
+ module Test
17
+ module Unit
18
+
19
+ ##
20
+ # Test::Unit::Assertions contains the standard Test::Unit assertions.
21
+ # Assertions is included in Test::Unit::TestCase.
22
+ #
23
+ # To include it in your own code and use its functionality, you simply
24
+ # need to rescue Test::Unit::AssertionFailedError. Additionally you may
25
+ # override add_assertion to get notified whenever an assertion is made.
26
+ #
27
+ # Notes:
28
+ #
29
+ # * The message to each assertion, if given, will be propagated with the
30
+ # failure.
31
+ # * It is easy to add your own assertions based on assert_block().
32
+ #
33
+ # @example Example Custom Assertion
34
+ #
35
+ # def deny(boolean, message=nil)
36
+ # message = build_message(message, '<?> is not false or nil.', boolean)
37
+ # assert_block(message) do
38
+ # not boolean
39
+ # end
40
+ # end
41
+
42
+ module Assertions
43
+
44
+ ##
45
+ # The assertion upon which all other assertions are based. Passes if the
46
+ # block yields true.
47
+ #
48
+ # @example
49
+ # assert_block "Couldn't do the thing" do
50
+ # do_the_thing
51
+ # end
52
+ def assert_block(message="assert_block failed.")
53
+ _wrap_assertion do
54
+ if (! yield)
55
+ options = {}
56
+ if message.respond_to?(:user_message)
57
+ options[:user_message] = message.user_message
58
+ end
59
+ raise AssertionFailedError.new(message.to_s, options)
60
+ end
61
+ end
62
+ end
63
+
64
+ # @private
65
+ NOT_SPECIFIED = Object.new
66
+
67
+ # @overload assert(object, message=nil)
68
+ #
69
+ # Asserts that `object` is not false nor nil.
70
+ #
71
+ # Normally, you don't need to use this assertion. Use more
72
+ # specific assertions such as #assert_equal and
73
+ # #assert_include.
74
+ #
75
+ # @example Pass patterns
76
+ # assert(true) # => pass
77
+ # assert([1, 2].include?(1)) # => pass
78
+ #
79
+ # @example Failure patterns
80
+ # assert(nil) # => failure
81
+ # assert(false) # => failure
82
+ # assert([1, 2].include?(5)) # => failure
83
+ #
84
+ # @param [Object] object The check target.
85
+ # @param [String] message The additional user message. It is
86
+ # showed when the assertion is failed.
87
+ # @return [void]
88
+ #
89
+ # @overload assert(message=nil) {}
90
+ #
91
+ # Asserts that the givens block returns not false nor nil.
92
+ #
93
+ # This style uses Power Assert. It means that you can see each
94
+ # object values in method chains on failure. See the following
95
+ # example about Power Assert.
96
+ #
97
+ # @example Power Assert
98
+ # coins = [1, 5, 50]
99
+ # target_coin = 10
100
+ # assert do
101
+ # coins.include?(target_coin)
102
+ # end
103
+ # # =>
104
+ # # coins.include?(target_coin)
105
+ # # | | |
106
+ # # | | 10
107
+ # # | false
108
+ # # [1, 5, 50]
109
+ #
110
+ # We recommend you to use Power Assert for predicate method
111
+ # checks rather than existing assertions such as
112
+ # #assert_include and #assert_predicate. Power Assert shows
113
+ # useful message for debugging.
114
+ #
115
+ # We don't recommend you use Power Assert for equality
116
+ # check. You should use #assert_equal for the case. Because
117
+ # #assert_equal shows more useful message for debugging.
118
+ #
119
+ # @example Pass patterns
120
+ # assert {true} # => pass
121
+ # assert {[1, 2].include?(1)} # => pass
122
+ #
123
+ # @example Failure patterns
124
+ # assert {nil} # => failure
125
+ # assert {false} # => failure
126
+ # assert {[1, 2].include?(5)} # => failure
127
+ #
128
+ # @param [String] message The additional user message. It is
129
+ # showed when the assertion is failed.
130
+ # @yield [] Given no parameters to the block.
131
+ # @yieldreturn [Object] The checked object.
132
+ # @return [void]
133
+ def assert(object=NOT_SPECIFIED, message=nil, &block)
134
+ _wrap_assertion do
135
+ have_object = !NOT_SPECIFIED.equal?(object)
136
+ if block
137
+ message = object if have_object
138
+ if defined?(PowerAssert)
139
+ PowerAssert.start(block, :assertion_method => __callee__) do |pa|
140
+ pa_message = AssertionMessage.delayed_literal(&pa.message_proc)
141
+ assertion_message = build_message(message, "?", pa_message)
142
+ assert_block(assertion_message) do
143
+ pa.yield
144
+ end
145
+ end
146
+ else
147
+ assert(yield, message)
148
+ end
149
+ else
150
+ unless have_object
151
+ raise ArgumentError, "wrong number of arguments (0 for 1..2)"
152
+ end
153
+ assertion_message = nil
154
+ case message
155
+ when nil, String, Proc
156
+ when AssertionMessage
157
+ assertion_message = message
158
+ else
159
+ error_message = "assertion message must be String, Proc or "
160
+ error_message += "#{AssertionMessage}: "
161
+ error_message += "<#{message.inspect}>(<#{message.class}>)"
162
+ raise ArgumentError, error_message, filter_backtrace(caller)
163
+ end
164
+ assertion_message ||= build_message(message,
165
+ "<?> is not true.",
166
+ object)
167
+ assert_block(assertion_message) do
168
+ object
169
+ end
170
+ end
171
+ end
172
+ end
173
+
174
+ # Asserts that `object` is false or nil.
175
+ #
176
+ # @note Just for minitest compatibility. :<
177
+ #
178
+ # @param [Object] object The object to be asserted.
179
+ # @return [void]
180
+ #
181
+ # @example Pass patterns
182
+ # refute(false) # => pass
183
+ # refute(nil) # => pass
184
+ #
185
+ # @example Failure patterns
186
+ # refute(true) # => failure
187
+ # refute("string") # => failure
188
+ #
189
+ # @since 2.5.3
190
+ def refute(object, message=nil)
191
+ _wrap_assertion do
192
+ assertion_message = nil
193
+ case message
194
+ when nil, String, Proc
195
+ when AssertionMessage
196
+ assertion_message = message
197
+ else
198
+ error_message = "assertion message must be String, Proc or "
199
+ error_message += "#{AssertionMessage}: "
200
+ error_message += "<#{message.inspect}>(<#{message.class}>)"
201
+ raise ArgumentError, error_message, filter_backtrace(caller)
202
+ end
203
+ assert_block("refute should not be called with a block.") do
204
+ !block_given?
205
+ end
206
+ assertion_message ||= build_message(message,
207
+ "<?> is neither nil or false.",
208
+ object)
209
+ assert_block(assertion_message) do
210
+ not object
211
+ end
212
+ end
213
+ end
214
+
215
+ ##
216
+ # Passes if `expected` == `actual`.
217
+ #
218
+ # Note that the ordering of arguments is important, since a helpful
219
+ # error message is generated when this one fails that tells you the
220
+ # values of expected and actual.
221
+ #
222
+ # @example
223
+ # assert_equal 'MY STRING', 'my string'.upcase
224
+ def assert_equal(expected, actual, message=nil)
225
+ diff = AssertionMessage.delayed_diff(expected, actual)
226
+ if expected.respond_to?(:encoding) and
227
+ actual.respond_to?(:encoding) and
228
+ expected.encoding != actual.encoding
229
+ format = <<EOT
230
+ <?>(?) expected but was
231
+ <?>(?).?
232
+ EOT
233
+ full_message = build_message(message, format,
234
+ expected, expected.encoding.name,
235
+ actual, actual.encoding.name,
236
+ diff)
237
+ else
238
+ full_message = build_message(message, <<EOT, expected, actual, diff)
239
+ <?> expected but was
240
+ <?>.?
241
+ EOT
242
+ end
243
+ begin
244
+ assert_block(full_message) { expected == actual }
245
+ rescue AssertionFailedError => failure
246
+ _set_failed_information(failure, expected, actual)
247
+ raise failure # For JRuby. :<
248
+ end
249
+ end
250
+
251
+ ##
252
+ # Passes if the block raises one of the expected
253
+ # exceptions. When an expected exception is an Exception
254
+ # object, passes if expected_exception == actual_exception.
255
+ #
256
+ # @example
257
+ # assert_raise(RuntimeError, LoadError) do
258
+ # raise 'Boom!!!'
259
+ # end # -> pass
260
+ #
261
+ # assert_raise do
262
+ # raise Exception, 'Any exception should be raised!!!'
263
+ # end # -> pass
264
+ #
265
+ # assert_raise(RuntimeError.new("XXX")) {raise "XXX"} # -> pass
266
+ # assert_raise(MyError.new("XXX")) {raise "XXX"} # -> fail
267
+ # assert_raise(RuntimeError.new("ZZZ")) {raise "XXX"} # -> fail
268
+ def assert_raise(*args, &block)
269
+ assert_expected_exception = Proc.new do |*_args|
270
+ message, assert_exception_helper, actual_exception = _args
271
+ expected = assert_exception_helper.expected_exceptions
272
+ diff = AssertionMessage.delayed_diff(expected, actual_exception)
273
+ full_message = build_message(message,
274
+ "<?> exception expected but was\n<?>.?",
275
+ expected, actual_exception, diff)
276
+ begin
277
+ assert_block(full_message) do
278
+ expected == [] or
279
+ assert_exception_helper.expected?(actual_exception)
280
+ end
281
+ rescue AssertionFailedError => failure
282
+ _set_failed_information(failure, expected, actual_exception)
283
+ raise failure # For JRuby. :<
284
+ end
285
+ end
286
+ _assert_raise(assert_expected_exception, *args, &block)
287
+ end
288
+
289
+ # Just for minitest compatibility. :<
290
+ alias_method :assert_raises, :assert_raise
291
+
292
+ ##
293
+ # Passes if the block raises one of the given
294
+ # exceptions or sub exceptions of the given exceptions.
295
+ #
296
+ # @example
297
+ # assert_raise_kind_of(SystemCallError) do
298
+ # raise Errno::EACCES
299
+ # end
300
+ def assert_raise_kind_of(*args, &block)
301
+ assert_expected_exception = Proc.new do |*_args|
302
+ message, assert_exception_helper, actual_exception = _args
303
+ expected = assert_exception_helper.expected_exceptions
304
+ full_message = build_message(message,
305
+ "<?> family exception expected " +
306
+ "but was\n<?>.",
307
+ expected, actual_exception)
308
+ assert_block(full_message) do
309
+ assert_exception_helper.expected?(actual_exception, :kind_of?)
310
+ end
311
+ end
312
+ _assert_raise(assert_expected_exception, *args, &block)
313
+ end
314
+
315
+
316
+ ##
317
+ # Passes if `object`.instance_of?(`klass`). When `klass` is
318
+ # an array of classes, it passes if any class
319
+ # satisfies +object.instance_of?(class).
320
+ #
321
+ # @example
322
+ # assert_instance_of(String, 'foo') # -> pass
323
+ # assert_instance_of([Fixnum, NilClass], 100) # -> pass
324
+ # assert_instance_of([Numeric, NilClass], 100) # -> fail
325
+ def assert_instance_of(klass, object, message=nil)
326
+ _wrap_assertion do
327
+ if klass.is_a?(Array)
328
+ klasses = klass
329
+ else
330
+ klasses = [klass]
331
+ end
332
+ assert_block("The first parameter to assert_instance_of should be " +
333
+ "a Class or an Array of Class.") do
334
+ klasses.all? {|k| k.is_a?(Class)}
335
+ end
336
+ klass_message = AssertionMessage.maybe_container(klass) do |value|
337
+ "<#{value}>"
338
+ end
339
+ full_message = build_message(message, <<EOT, object, klass_message, object.class)
340
+ <?> was expected to be instance_of\\?
341
+ ? but was
342
+ <?>.
343
+ EOT
344
+ assert_block(full_message) do
345
+ klasses.any? {|k| object.instance_of?(k)}
346
+ end
347
+ end
348
+ end
349
+
350
+ ##
351
+ # Passes if `object`.instance_of?(`klass`) does not hold.
352
+ # When `klass` is an array of classes, it passes if no class
353
+ # satisfies +object.instance_of?(class).
354
+ #
355
+ # @example
356
+ # assert_not_instance_of(String, 100) # -> pass
357
+ # assert_not_instance_of([Fixnum, NilClass], '100') # -> pass
358
+ # assert_not_instance_of([Numeric, NilClass], 100) # -> fail
359
+ #
360
+ # @since 3.0.0
361
+ def assert_not_instance_of(klass, object, message=nil)
362
+ _wrap_assertion do
363
+ if klass.is_a?(Array)
364
+ klasses = klass
365
+ else
366
+ klasses = [klass]
367
+ end
368
+ assert_block("The first parameter to assert_not_instance_of should be " +
369
+ "a Class or an Array of Class.") do
370
+ klasses.all? {|k| k.is_a?(Class)}
371
+ end
372
+ klass_message = AssertionMessage.maybe_container(klass) do |value|
373
+ "<#{value}>"
374
+ end
375
+ full_message = build_message(message,
376
+ "<?> was expected to not be instance_of\\?\n" +
377
+ "? but was.",
378
+ object,
379
+ klass_message)
380
+ assert_block(full_message) do
381
+ klasses.none? {|k| object.instance_of?(k)}
382
+ end
383
+ end
384
+ end
385
+
386
+ # Just for minitest compatibility. :<
387
+ #
388
+ # @since 3.0.0
389
+ alias_method :refute_instance_of, :assert_not_instance_of
390
+
391
+ ##
392
+ # Passes if `object` is nil.
393
+ #
394
+ # @example
395
+ # assert_nil [1, 2].uniq!
396
+ def assert_nil(object, message=nil)
397
+ full_message = build_message(message, <<EOT, object)
398
+ <?> was expected to be nil.
399
+ EOT
400
+ assert_block(full_message) { object.nil? }
401
+ end
402
+
403
+ ##
404
+ # Passes if `object`.kind_of?(`klass`). When `klass` is
405
+ # an array of classes or modules, it passes if any
406
+ # class or module satisfies +object.kind_of?(class_or_module).
407
+ #
408
+ # @example
409
+ # assert_kind_of(Object, 'foo') # -> pass
410
+ # assert_kind_of([Fixnum, NilClass], 100) # -> pass
411
+ # assert_kind_of([Fixnum, NilClass], "string") # -> fail
412
+ def assert_kind_of(klass, object, message=nil)
413
+ _wrap_assertion do
414
+ if klass.is_a?(Array)
415
+ klasses = klass
416
+ else
417
+ klasses = [klass]
418
+ end
419
+ assert_block("The first parameter to assert_kind_of should be " +
420
+ "a kind_of Module or an Array of a kind_of Module.") do
421
+ klasses.all? {|k| k.kind_of?(Module)}
422
+ end
423
+ klass_message = AssertionMessage.maybe_container(klass) do |value|
424
+ "<#{value}>"
425
+ end
426
+ full_message = build_message(message,
427
+ "<?> was expected to be kind_of\\?\n" +
428
+ "? but was\n" +
429
+ "<?>.",
430
+ object,
431
+ klass_message,
432
+ object.class)
433
+ assert_block(full_message) do
434
+ klasses.any? {|k| object.kind_of?(k)}
435
+ end
436
+ end
437
+ end
438
+
439
+ ##
440
+ # Passes if `object`.kind_of?(`klass`) does not hold.
441
+ # When `klass` is an array of classes or modules, it passes only if all
442
+ # classes (and modules) do not satisfy +object.kind_of?(class_or_module).
443
+ #
444
+ # @example
445
+ # assert_not_kind_of(Fixnum, 'foo') # -> pass
446
+ # assert_not_kind_of([Fixnum, NilClass], '0') # -> pass
447
+ # assert_not_kind_of([Fixnum, NilClass], 100) # -> fail
448
+ #
449
+ # @since 3.0.0
450
+ def assert_not_kind_of(klass, object, message=nil)
451
+ _wrap_assertion do
452
+ if klass.is_a?(Array)
453
+ klasses = klass
454
+ else
455
+ klasses = [klass]
456
+ end
457
+ assert_block("The first parameter to assert_not_kind_of should be " +
458
+ "a kind_of Module or an Array of a kind_of Module.") do
459
+ klasses.all? {|k| k.kind_of?(Module)}
460
+ end
461
+ klass_message = AssertionMessage.maybe_container(klass) do |value|
462
+ "<#{value}>"
463
+ end
464
+ full_message = build_message(message,
465
+ "<?> was expected to not be kind_of\\?\n" +
466
+ "? but was.",
467
+ object,
468
+ klass_message)
469
+ assert_block(full_message) do
470
+ klasses.none? {|k| object.kind_of?(k)}
471
+ end
472
+ end
473
+ end
474
+
475
+ # Just for minitest compatibility. :<
476
+ #
477
+ # @since 3.0.0
478
+ alias_method :refute_kind_of, :assert_not_kind_of
479
+
480
+ ##
481
+ # Passes if `object` .respond_to? `method`
482
+ #
483
+ # @example
484
+ # assert_respond_to 'bugbear', :slice
485
+ def assert_respond_to(object, method, message=nil)
486
+ _wrap_assertion do
487
+ full_message = build_message(message,
488
+ "<?>.kind_of\\?(Symbol) or\n" +
489
+ "<?>.respond_to\\?(:to_str) expected",
490
+ method, method)
491
+ assert_block(full_message) do
492
+ method.kind_of?(Symbol) or method.respond_to?(:to_str)
493
+ end
494
+ full_message = build_message(message,
495
+ "<?>.respond_to\\?(?) expected\n" +
496
+ "(Class: <?>)",
497
+ object, method, object.class)
498
+ assert_block(full_message) {object.respond_to?(method)}
499
+ end
500
+ end
501
+
502
+ ##
503
+ # Passes if `object` does not .respond_to? `method`.
504
+ #
505
+ # @example
506
+ # assert_not_respond_to('bugbear', :nonexistence) # -> pass
507
+ # assert_not_respond_to('bugbear', :size) # -> fail
508
+ def assert_not_respond_to(object, method, message=nil)
509
+ _wrap_assertion do
510
+ full_message = build_message(message,
511
+ "<?>.kind_of\\?(Symbol) or\n" +
512
+ "<?>.respond_to\\?(:to_str) expected",
513
+ method, method)
514
+ assert_block(full_message) do
515
+ method.kind_of?(Symbol) or method.respond_to?(:to_str)
516
+ end
517
+ full_message = build_message(message,
518
+ "!<?>.respond_to\\?(?) expected\n" +
519
+ "(Class: <?>)",
520
+ object, method, object.class)
521
+ assert_block(full_message) {!object.respond_to?(method)}
522
+ end
523
+ end
524
+
525
+ # Just for minitest compatibility. :<
526
+ #
527
+ # @since 2.5.3
528
+ alias_method :refute_respond_to, :assert_not_respond_to
529
+
530
+ ##
531
+ # Passes if `pattern` =~ `string`.
532
+ #
533
+ # @example
534
+ # assert_match(/\d+/, 'five, 6, seven')
535
+ def assert_match(pattern, string, message=nil)
536
+ _wrap_assertion do
537
+ pattern = case(pattern)
538
+ when String
539
+ Regexp.new(Regexp.escape(pattern))
540
+ else
541
+ pattern
542
+ end
543
+ full_message = build_message(message,
544
+ "<?> was expected to be =~\n<?>.",
545
+ pattern, string)
546
+ assert_block(full_message) { pattern =~ string }
547
+ end
548
+ end
549
+
550
+ ##
551
+ # Passes if `actual` .equal? `expected` (i.e. they are the same
552
+ # instance).
553
+ #
554
+ # @example
555
+ # o = Object.new
556
+ # assert_same o, o
557
+ def assert_same(expected, actual, message=nil)
558
+ full_message = build_message(message, <<EOT, expected, expected.__id__, actual, actual.__id__)
559
+ <?>
560
+ with id <?> was expected to be equal\\? to
561
+ <?>
562
+ with id <?>.
563
+ EOT
564
+ assert_block(full_message) { actual.equal?(expected) }
565
+ end
566
+
567
+ ##
568
+ # Compares the `object1` with `object2` using `operator`.
569
+ #
570
+ # Passes if object1.__send__(operator, object2) is true.
571
+ #
572
+ # @example
573
+ # assert_operator 5, :>=, 4
574
+ def assert_operator(object1, operator, object2, message=nil)
575
+ _wrap_assertion do
576
+ full_message = build_message(nil, "<?>\ngiven as the operator for #assert_operator must be a Symbol or #respond_to\\?(:to_str).", operator)
577
+ assert_block(full_message){operator.kind_of?(Symbol) || operator.respond_to?(:to_str)}
578
+ full_message = build_message(message, <<EOT, object1, AssertionMessage.literal(operator), object2)
579
+ <?> was expected to be
580
+ ?
581
+ <?>.
582
+ EOT
583
+ assert_block(full_message) { object1.__send__(operator, object2) }
584
+ end
585
+ end
586
+
587
+ ##
588
+ # Compares the `object1` with `object2` using `operator`.
589
+ #
590
+ # Passes if object1.__send__(operator, object2) is not true.
591
+ #
592
+ # @example
593
+ # assert_not_operator(5, :<, 4) # => pass
594
+ # assert_not_operator(5, :>, 4) # => fail
595
+ #
596
+ # @since 3.0.0
597
+ def assert_not_operator(object1, operator, object2, message=nil)
598
+ _wrap_assertion do
599
+ full_message = build_message(nil, "<?>\ngiven as the operator for #assert_not_operator must be a Symbol or #respond_to\\?(:to_str).", operator)
600
+ assert_block(full_message){operator.kind_of?(Symbol) || operator.respond_to?(:to_str)}
601
+ full_message = build_message(message, <<EOT, object1, AssertionMessage.literal(operator), object2)
602
+ <?> was expected to not be
603
+ ?
604
+ <?>.
605
+ EOT
606
+ assert_block(full_message) { ! object1.__send__(operator, object2) }
607
+ end
608
+ end
609
+
610
+ # Just for minitest compatibility. :<
611
+ #
612
+ # @since 3.0.0
613
+ alias_method :refute_operator, :assert_not_operator
614
+
615
+ ##
616
+ # Passes if block does not raise an exception.
617
+ #
618
+ # @example
619
+ # assert_nothing_raised do
620
+ # [1, 2].uniq
621
+ # end
622
+ def assert_nothing_raised(*args)
623
+ _wrap_assertion do
624
+ if args.last.is_a?(String)
625
+ message = args.pop
626
+ else
627
+ message = ""
628
+ end
629
+
630
+ assert_exception_helper = AssertExceptionHelper.new(self, args)
631
+ begin
632
+ yield
633
+ rescue Exception => e
634
+ if ((args.empty? && !e.instance_of?(AssertionFailedError)) ||
635
+ assert_exception_helper.expected?(e))
636
+ failure_message = build_message(message, "Exception raised:\n?", e)
637
+ assert_block(failure_message) {false}
638
+ else
639
+ raise
640
+ end
641
+ end
642
+ end
643
+ end
644
+
645
+ ##
646
+ # Flunk always fails.
647
+ #
648
+ # @example
649
+ # flunk 'Not done testing yet.'
650
+ def flunk(message="Flunked")
651
+ assert_block(build_message(message)){false}
652
+ end
653
+
654
+ ##
655
+ # Passes if ! `actual` .equal? `expected`
656
+ #
657
+ # @example
658
+ # assert_not_same Object.new, Object.new
659
+ def assert_not_same(expected, actual, message=nil)
660
+ full_message = build_message(message, <<EOT, expected, expected.__id__, actual, actual.__id__)
661
+ <?>
662
+ with id <?> was expected to not be equal\\? to
663
+ <?>
664
+ with id <?>.
665
+ EOT
666
+ assert_block(full_message) { !actual.equal?(expected) }
667
+ end
668
+
669
+ # Just for minitest compatibility. :<
670
+ #
671
+ # @since 2.5.3
672
+ alias_method :refute_same, :assert_not_same
673
+
674
+ ##
675
+ # Passes if `expected` != `actual`
676
+ #
677
+ # @example
678
+ # assert_not_equal 'some string', 5
679
+ def assert_not_equal(expected, actual, message=nil)
680
+ full_message = build_message(message,
681
+ "<?> was expected to be != to\n<?>.",
682
+ expected, actual)
683
+ assert_block(full_message) { expected != actual }
684
+ end
685
+
686
+ # Just for minitest compatibility. :<
687
+ #
688
+ # @since 2.5.3
689
+ alias_method :refute_equal, :assert_not_equal
690
+
691
+ ##
692
+ # Passes if ! `object` .nil?
693
+ #
694
+ # @example
695
+ # assert_not_nil '1 two 3'.sub!(/two/, '2')
696
+ def assert_not_nil(object, message=nil)
697
+ full_message = build_message(message,
698
+ "<?> was expected to not be nil.",
699
+ object)
700
+ assert_block(full_message){!object.nil?}
701
+ end
702
+
703
+ # Just for minitest compatibility. :<
704
+ #
705
+ # @since 2.5.3
706
+ alias_method :refute_nil, :assert_not_nil
707
+
708
+ ##
709
+ # Passes if `regexp` !~ `string`
710
+ #
711
+ # @example
712
+ # assert_not_match(/two/, 'one 2 three') # -> pass
713
+ # assert_not_match(/three/, 'one 2 three') # -> fail
714
+ def assert_not_match(regexp, string, message=nil)
715
+ _wrap_assertion do
716
+ assert_instance_of(Regexp, regexp,
717
+ "<REGEXP> in assert_not_match(<REGEXP>, ...) " +
718
+ "should be a Regexp.")
719
+ full_message = build_message(message,
720
+ "<?> was expected to not match\n<?>.",
721
+ regexp, string)
722
+ assert_block(full_message) { regexp !~ string }
723
+ end
724
+ end
725
+
726
+ # Just for minitest compatibility. :<
727
+ #
728
+ # @since 2.5.3
729
+ alias_method :refute_match, :assert_not_match
730
+
731
+ ##
732
+ # Deprecated. Use #assert_not_match instead.
733
+ #
734
+ # Passes if `regexp` !~ `string`
735
+ #
736
+ # @example
737
+ # assert_no_match(/two/, 'one 2 three') # -> pass
738
+ # assert_no_match(/three/, 'one 2 three') # -> fail
739
+ def assert_no_match(regexp, string, message="")
740
+ _wrap_assertion do
741
+ assert_instance_of(Regexp, regexp,
742
+ "The first argument to assert_no_match " +
743
+ "should be a Regexp.")
744
+ assert_not_match(regexp, string, message)
745
+ end
746
+ end
747
+
748
+ # @private
749
+ class ThrowTagExtractor
750
+ @@have_uncaught_throw_error = const_defined?(:UncaughtThrowError)
751
+
752
+ UncaughtThrowPatterns = {
753
+ NameError => /^uncaught throw `(.+)'$/,
754
+ ArgumentError => /^uncaught throw (`.+'|.+)$/,
755
+ ThreadError => /^uncaught throw `(.+)' in thread /,
756
+ }
757
+
758
+ def initialize(error)
759
+ @error = error
760
+ end
761
+
762
+ def extract_tag
763
+ tag = nil
764
+ if @@have_uncaught_throw_error
765
+ return nil unless @error.is_a?(UncaughtThrowError)
766
+ tag = @error.tag
767
+ else
768
+ pattern = UncaughtThrowPatterns[@error.class]
769
+ return nil if pattern.nil?
770
+ return nil unless pattern =~ @error.message
771
+ tag = $1
772
+ end
773
+ normalize_tag(tag)
774
+ end
775
+
776
+ private
777
+ def normalize_tag(tag)
778
+ case tag
779
+ when /\A:/
780
+ tag[1..-1].intern
781
+ when /\A`(.+)'\z/
782
+ $1.intern
783
+ when String
784
+ tag.intern
785
+ else
786
+ tag
787
+ end
788
+ end
789
+ end
790
+
791
+ ##
792
+ # Passes if the block throws `expected_object`
793
+ #
794
+ # @example
795
+ # assert_throw(:done) do
796
+ # throw(:done)
797
+ # end
798
+ def assert_throw(expected_object, message=nil, &proc)
799
+ _wrap_assertion do
800
+ begin
801
+ catch([]) {}
802
+ rescue TypeError
803
+ assert_instance_of(Symbol, expected_object,
804
+ "assert_throws expects the symbol that should be thrown for its first argument")
805
+ end
806
+ assert_block("Should have passed a block to assert_throw.") do
807
+ block_given?
808
+ end
809
+ caught = true
810
+ begin
811
+ catch(expected_object) do
812
+ proc.call
813
+ caught = false
814
+ end
815
+ full_message = build_message(message,
816
+ "<?> should have been thrown.",
817
+ expected_object)
818
+ assert_block(full_message) {caught}
819
+ rescue => error
820
+ extractor = ThrowTagExtractor.new(error)
821
+ tag = extractor.extract_tag
822
+ raise if tag.nil?
823
+ full_message = build_message(message,
824
+ "<?> was expected to be thrown but\n" +
825
+ "<?> was thrown.",
826
+ expected_object, tag)
827
+ flunk(full_message)
828
+ end
829
+ end
830
+ end
831
+
832
+ # Just for minitest compatibility. :<
833
+ #
834
+ # @since 2.5.3
835
+ alias_method :assert_throws, :assert_throw
836
+
837
+ ##
838
+ # Passes if block does not throw anything.
839
+ #
840
+ # @example
841
+ # assert_nothing_thrown do
842
+ # [1, 2].uniq
843
+ # end
844
+ def assert_nothing_thrown(message=nil, &proc)
845
+ _wrap_assertion do
846
+ assert(block_given?, "Should have passed a block to assert_nothing_thrown")
847
+ begin
848
+ proc.call
849
+ rescue => error
850
+ extractor = ThrowTagExtractor.new(error)
851
+ tag = extractor.extract_tag
852
+ raise if tag.nil?
853
+ full_message = build_message(message,
854
+ "<?> was thrown when nothing was expected",
855
+ tag)
856
+ flunk(full_message)
857
+ end
858
+ assert(true, "Expected nothing to be thrown")
859
+ end
860
+ end
861
+
862
+ ##
863
+ # Passes if `expected_float` and `actual_float` are equal
864
+ # within `delta` tolerance.
865
+ #
866
+ # @example
867
+ # assert_in_delta 0.05, (50000.0 / 10**6), 0.00001
868
+ def assert_in_delta(expected_float, actual_float, delta=0.001, message="")
869
+ _wrap_assertion do
870
+ _assert_in_delta_validate_arguments(expected_float,
871
+ actual_float,
872
+ delta)
873
+ full_message = _assert_in_delta_message(expected_float,
874
+ actual_float,
875
+ delta,
876
+ message)
877
+ assert_block(full_message) do
878
+ (expected_float.to_f - actual_float.to_f).abs <= delta.to_f
879
+ end
880
+ end
881
+ end
882
+
883
+ ##
884
+ # Passes if `expected_float` and `actual_float` are
885
+ # not equal within `delta` tolerance.
886
+ #
887
+ # @example
888
+ # assert_not_in_delta(0.05, (50000.0 / 10**6), 0.00002) # -> pass
889
+ # assert_not_in_delta(0.05, (50000.0 / 10**6), 0.00001) # -> fail
890
+ def assert_not_in_delta(expected_float, actual_float, delta=0.001, message="")
891
+ _wrap_assertion do
892
+ _assert_in_delta_validate_arguments(expected_float,
893
+ actual_float,
894
+ delta)
895
+ full_message = _assert_in_delta_message(expected_float,
896
+ actual_float,
897
+ delta,
898
+ message,
899
+ :negative_assertion => true)
900
+ assert_block(full_message) do
901
+ (expected_float.to_f - actual_float.to_f).abs > delta.to_f
902
+ end
903
+ end
904
+ end
905
+
906
+ # Just for minitest compatibility. :<
907
+ #
908
+ # @since 2.5.3
909
+ alias_method :refute_in_delta, :assert_not_in_delta
910
+
911
+ private
912
+ def _assert_in_delta_validate_arguments(expected_float,
913
+ actual_float,
914
+ delta)
915
+ {
916
+ expected_float => "first float",
917
+ actual_float => "second float",
918
+ delta => "delta"
919
+ }.each do |float, name|
920
+ assert_respond_to(float, :to_f,
921
+ "The arguments must respond to to_f; " +
922
+ "the #{name} did not")
923
+ end
924
+ delta = delta.to_f
925
+ assert_operator(delta, :>=, 0.0, "The delta should not be negative")
926
+ end
927
+
928
+ def _assert_in_delta_message(expected_float, actual_float, delta,
929
+ message, options={})
930
+ if options[:negative_assertion]
931
+ format = <<-EOT
932
+ <?> -/+ <?> was expected to not include
933
+ <?>.
934
+ EOT
935
+ else
936
+ format = <<-EOT
937
+ <?> -/+ <?> was expected to include
938
+ <?>.
939
+ EOT
940
+ end
941
+ arguments = [expected_float, delta, actual_float]
942
+ normalized_expected = expected_float.to_f
943
+ normalized_actual = actual_float.to_f
944
+ normalized_delta = delta.to_f
945
+ relation_format = nil
946
+ relation_arguments = nil
947
+ if normalized_actual < normalized_expected - normalized_delta
948
+ relation_format = "<<?> < <?>-<?>[?] <= <?>+<?>[?]>"
949
+ relation_arguments = [actual_float,
950
+ expected_float, delta,
951
+ normalized_expected - normalized_delta,
952
+ expected_float, delta,
953
+ normalized_expected + normalized_delta]
954
+ elsif normalized_actual <= normalized_expected + normalized_delta
955
+ relation_format = "<<?>-<?>[?] <= <?> <= <?>+<?>[?]>"
956
+ relation_arguments = [expected_float, delta,
957
+ normalized_expected - normalized_delta,
958
+ actual_float,
959
+ expected_float, delta,
960
+ normalized_expected + normalized_delta]
961
+ else
962
+ relation_format = "<<?>-<?>[?] <= <?>+<?>[?] < <?>>"
963
+ relation_arguments = [expected_float, delta,
964
+ normalized_expected - normalized_delta,
965
+ expected_float, delta,
966
+ normalized_expected + normalized_delta,
967
+ actual_float]
968
+ end
969
+
970
+ if relation_format
971
+ format += <<-EOT
972
+
973
+ Relation:
974
+ #{relation_format}
975
+ EOT
976
+ arguments.concat(relation_arguments)
977
+ end
978
+
979
+ build_message(message, format, *arguments)
980
+ end
981
+
982
+ public
983
+ ##
984
+ # Passes if `expected_float` and `actual_float` are equal
985
+ # within `epsilon` relative error of `expected_float`.
986
+ #
987
+ # @example
988
+ # assert_in_epsilon(10000.0, 9900.0, 0.1) # -> pass
989
+ # assert_in_epsilon(10000.0, 9899.0, 0.1) # -> fail
990
+ def assert_in_epsilon(expected_float, actual_float, epsilon=0.001,
991
+ message="")
992
+ _wrap_assertion do
993
+ _assert_in_epsilon_validate_arguments(expected_float,
994
+ actual_float,
995
+ epsilon)
996
+ full_message = _assert_in_epsilon_message(expected_float,
997
+ actual_float,
998
+ epsilon,
999
+ message)
1000
+ assert_block(full_message) do
1001
+ normalized_expected_float = expected_float.to_f
1002
+ if normalized_expected_float.zero?
1003
+ delta = epsilon.to_f ** 2
1004
+ else
1005
+ delta = normalized_expected_float * epsilon.to_f
1006
+ end
1007
+ delta = delta.abs
1008
+ (normalized_expected_float - actual_float.to_f).abs <= delta
1009
+ end
1010
+ end
1011
+ end
1012
+
1013
+ ##
1014
+ # Passes if `expected_float` and `actual_float` are
1015
+ # not equal within `epsilon` relative error of
1016
+ # `expected_float`.
1017
+ #
1018
+ # @example
1019
+ # assert_not_in_epsilon(10000.0, 9900.0, 0.1) # -> fail
1020
+ # assert_not_in_epsilon(10000.0, 9899.0, 0.1) # -> pass
1021
+ def assert_not_in_epsilon(expected_float, actual_float, epsilon=0.001,
1022
+ message="")
1023
+ _wrap_assertion do
1024
+ _assert_in_epsilon_validate_arguments(expected_float,
1025
+ actual_float,
1026
+ epsilon)
1027
+ full_message = _assert_in_epsilon_message(expected_float,
1028
+ actual_float,
1029
+ epsilon,
1030
+ message,
1031
+ :negative_assertion => true)
1032
+ assert_block(full_message) do
1033
+ normalized_expected_float = expected_float.to_f
1034
+ delta = normalized_expected_float * epsilon.to_f
1035
+ (normalized_expected_float - actual_float.to_f).abs > delta
1036
+ end
1037
+ end
1038
+ end
1039
+
1040
+ # Just for minitest compatibility. :<
1041
+ #
1042
+ # @since 3.0.0
1043
+ alias_method :refute_in_epsilon, :assert_not_in_epsilon
1044
+
1045
+ private
1046
+ def _assert_in_epsilon_validate_arguments(expected_float,
1047
+ actual_float,
1048
+ epsilon)
1049
+ {
1050
+ expected_float => "first float",
1051
+ actual_float => "second float",
1052
+ epsilon => "epsilon"
1053
+ }.each do |float, name|
1054
+ assert_respond_to(float, :to_f,
1055
+ "The arguments must respond to to_f; " +
1056
+ "the #{name} did not")
1057
+ end
1058
+ epsilon = epsilon.to_f
1059
+ assert_operator(epsilon, :>=, 0.0, "The epsilon should not be negative")
1060
+ end
1061
+
1062
+ def _assert_in_epsilon_message(expected_float, actual_float, epsilon,
1063
+ message, options={})
1064
+ normalized_expected = expected_float.to_f
1065
+ normalized_actual = actual_float.to_f
1066
+ normalized_epsilon = epsilon.to_f
1067
+ delta = normalized_expected * normalized_epsilon
1068
+
1069
+ if options[:negative_assertion]
1070
+ format = <<-EOT
1071
+ <?> -/+ (<?> * <?>)[?] was expected to not include
1072
+ <?>.
1073
+ EOT
1074
+ else
1075
+ format = <<-EOT
1076
+ <?> -/+ (<?> * <?>)[?] was expected to include
1077
+ <?>.
1078
+ EOT
1079
+ end
1080
+ arguments = [expected_float, expected_float, epsilon, delta,
1081
+ actual_float]
1082
+
1083
+ relation_format = nil
1084
+ relation_arguments = nil
1085
+ if normalized_actual < normalized_expected - delta
1086
+ relation_format = "<<?> < <?>-(<?>*<?>)[?] <= <?>+(<?>*<?>)[?]>"
1087
+ relation_arguments = [actual_float,
1088
+ expected_float, expected_float, epsilon,
1089
+ normalized_expected - delta,
1090
+ expected_float, expected_float, epsilon,
1091
+ normalized_expected + delta]
1092
+ elsif normalized_actual <= normalized_expected + delta
1093
+ relation_format = "<<?>-(<?>*<?>)[?] <= <?> <= <?>+(<?>*<?>)[?]>"
1094
+ relation_arguments = [expected_float, expected_float, epsilon,
1095
+ normalized_expected - delta,
1096
+ actual_float,
1097
+ expected_float, expected_float, epsilon,
1098
+ normalized_expected + delta]
1099
+ else
1100
+ relation_format = "<<?>-(<?>*<?>)[?] <= <?>+(<?>*<?>)[?] < <?>>"
1101
+ relation_arguments = [expected_float, expected_float, epsilon,
1102
+ normalized_expected - delta,
1103
+ expected_float, expected_float, epsilon,
1104
+ normalized_expected + delta,
1105
+ actual_float]
1106
+ end
1107
+
1108
+ if relation_format
1109
+ format += <<-EOT
1110
+
1111
+ Relation:
1112
+ #{relation_format}
1113
+ EOT
1114
+ arguments.concat(relation_arguments)
1115
+ end
1116
+
1117
+ build_message(message, format, *arguments)
1118
+ end
1119
+
1120
+ public
1121
+ ##
1122
+ # Passes if the method send returns a true value.
1123
+ #
1124
+ # `send_array` is composed of:
1125
+ # * A receiver
1126
+ # * A method
1127
+ # * Arguments to the method
1128
+ #
1129
+ # @example
1130
+ # assert_send([[1, 2], :member?, 1]) # -> pass
1131
+ # assert_send([[1, 2], :member?, 4]) # -> fail
1132
+ def assert_send(send_array, message=nil)
1133
+ _wrap_assertion do
1134
+ assert_instance_of(Array, send_array,
1135
+ "assert_send requires an array " +
1136
+ "of send information")
1137
+ assert_operator(send_array.size, :>=, 2,
1138
+ "assert_send requires at least a receiver " +
1139
+ "and a message name")
1140
+ format = <<EOT
1141
+ <?> was expected to respond to
1142
+ <?(*?)> with a true value but was
1143
+ <?>.
1144
+ EOT
1145
+ receiver, message_name, *arguments = send_array
1146
+ result = nil
1147
+ full_message =
1148
+ build_message(message,
1149
+ format,
1150
+ receiver,
1151
+ AssertionMessage.literal(message_name.to_s),
1152
+ arguments,
1153
+ AssertionMessage.delayed_literal {result})
1154
+ assert_block(full_message) do
1155
+ result = receiver.__send__(message_name, *arguments)
1156
+ result
1157
+ end
1158
+ end
1159
+ end
1160
+
1161
+ ##
1162
+ # Passes if the method send doesn't return a true value.
1163
+ #
1164
+ # `send_array` is composed of:
1165
+ # * A receiver
1166
+ # * A method
1167
+ # * Arguments to the method
1168
+ #
1169
+ # @example
1170
+ # assert_not_send([[1, 2], :member?, 1]) # -> fail
1171
+ # assert_not_send([[1, 2], :member?, 4]) # -> pass
1172
+ def assert_not_send(send_array, message=nil)
1173
+ _wrap_assertion do
1174
+ assert_instance_of(Array, send_array,
1175
+ "assert_not_send requires an array " +
1176
+ "of send information")
1177
+ assert_operator(send_array.size, :>=, 2,
1178
+ "assert_not_send requires at least a receiver " +
1179
+ "and a message name")
1180
+ format = <<EOT
1181
+ <?> was expected to respond to
1182
+ <?(*?)> with not a true value but was
1183
+ <?>.
1184
+ EOT
1185
+ receiver, message_name, *arguments = send_array
1186
+ result = nil
1187
+ full_message =
1188
+ build_message(message,
1189
+ format,
1190
+ receiver,
1191
+ AssertionMessage.literal(message_name.to_s),
1192
+ arguments,
1193
+ AssertionMessage.delayed_literal {result})
1194
+ assert_block(full_message) do
1195
+ result = receiver.__send__(message_name, *arguments)
1196
+ not result
1197
+ end
1198
+ end
1199
+ end
1200
+
1201
+ ##
1202
+ # Passes if `actual` is a boolean value.
1203
+ #
1204
+ # @example
1205
+ # assert_boolean(true) # -> pass
1206
+ # assert_boolean(nil) # -> fail
1207
+ def assert_boolean(actual, message=nil)
1208
+ _wrap_assertion do
1209
+ assert_block(build_message(message,
1210
+ "<true> or <false> expected but was\n<?>",
1211
+ actual)) do
1212
+ [true, false].include?(actual)
1213
+ end
1214
+ end
1215
+ end
1216
+
1217
+ ##
1218
+ # Passes if `actual` is true.
1219
+ #
1220
+ # @example
1221
+ # assert_true(true) # -> pass
1222
+ # assert_true(:true) # -> fail
1223
+ def assert_true(actual, message=nil)
1224
+ _wrap_assertion do
1225
+ assert_block(build_message(message,
1226
+ "<true> expected but was\n<?>",
1227
+ actual)) do
1228
+ actual == true
1229
+ end
1230
+ end
1231
+ end
1232
+
1233
+ ##
1234
+ # Passes if `actual` is false.
1235
+ #
1236
+ # @example
1237
+ # assert_false(false) # -> pass
1238
+ # assert_false(nil) # -> fail
1239
+ def assert_false(actual, message=nil)
1240
+ _wrap_assertion do
1241
+ assert_block(build_message(message,
1242
+ "<false> expected but was\n<?>",
1243
+ actual)) do
1244
+ actual == false
1245
+ end
1246
+ end
1247
+ end
1248
+
1249
+ ##
1250
+ # Passes if expression "`expected` `operator`
1251
+ # `actual`" is true.
1252
+ #
1253
+ # @example
1254
+ # assert_compare(1, "<", 10) # -> pass
1255
+ # assert_compare(1, ">=", 10) # -> fail
1256
+ def assert_compare(expected, operator, actual, message=nil)
1257
+ _wrap_assertion do
1258
+ assert_send([["<", "<=", ">", ">="], :include?, operator.to_s])
1259
+ case operator.to_s
1260
+ when "<"
1261
+ operator_description = "less than"
1262
+ when "<="
1263
+ operator_description = "less than or equal to"
1264
+ when ">"
1265
+ operator_description = "greater than"
1266
+ when ">="
1267
+ operator_description = "greater than or equal to"
1268
+ end
1269
+ template = <<-EOT
1270
+ <?> #{operator} <?> should be true
1271
+ <?> was expected to be #{operator_description}
1272
+ <?>.
1273
+ EOT
1274
+ full_message = build_message(message, template,
1275
+ expected, actual,
1276
+ expected, actual)
1277
+ assert_block(full_message) do
1278
+ expected.__send__(operator, actual)
1279
+ end
1280
+ end
1281
+ end
1282
+
1283
+ ##
1284
+ # Passes if assertion is failed in block.
1285
+ #
1286
+ # @example
1287
+ # assert_fail_assertion {assert_equal("A", "B")} # -> pass
1288
+ # assert_fail_assertion {assert_equal("A", "A")} # -> fail
1289
+ def assert_fail_assertion(message=nil)
1290
+ _wrap_assertion do
1291
+ full_message = build_message(message,
1292
+ "Failed assertion was expected.")
1293
+ assert_block(full_message) do
1294
+ begin
1295
+ yield
1296
+ false
1297
+ rescue AssertionFailedError
1298
+ true
1299
+ end
1300
+ end
1301
+ end
1302
+ end
1303
+
1304
+ ##
1305
+ # Passes if an exception is raised in block and its
1306
+ # message is `expected`.
1307
+ #
1308
+ # @example
1309
+ # assert_raise_message("exception") {raise "exception"} # -> pass
1310
+ # assert_raise_message(/exc/i) {raise "exception"} # -> pass
1311
+ # assert_raise_message("exception") {raise "EXCEPTION"} # -> fail
1312
+ # assert_raise_message("exception") {} # -> fail
1313
+ def assert_raise_message(expected, message=nil)
1314
+ _wrap_assertion do
1315
+ full_message = build_message(message,
1316
+ "<?> exception message was expected " +
1317
+ "but none was thrown.",
1318
+ expected)
1319
+ exception = nil
1320
+ assert_block(full_message) do
1321
+ begin
1322
+ yield
1323
+ false
1324
+ rescue Exception => exception
1325
+ true
1326
+ end
1327
+ end
1328
+
1329
+ actual = exception.message
1330
+ diff = AssertionMessage.delayed_diff(expected, actual)
1331
+ full_message =
1332
+ build_message(message,
1333
+ "<?> exception message expected but was\n" +
1334
+ "<?>.?", expected, actual, diff)
1335
+ assert_block(full_message) do
1336
+ if expected.is_a?(Regexp)
1337
+ expected =~ actual
1338
+ else
1339
+ expected == actual
1340
+ end
1341
+ end
1342
+ end
1343
+ end
1344
+
1345
+ ##
1346
+ # Passes if `object`.const_defined?(`constant_name`)
1347
+ #
1348
+ # @example
1349
+ # assert_const_defined(Test, :Unit) # -> pass
1350
+ # assert_const_defined(Object, :Nonexistent) # -> fail
1351
+ def assert_const_defined(object, constant_name, message=nil)
1352
+ _wrap_assertion do
1353
+ full_message = build_message(message,
1354
+ "<?>.const_defined\\?(<?>) expected.",
1355
+ object, constant_name)
1356
+ assert_block(full_message) do
1357
+ object.const_defined?(constant_name)
1358
+ end
1359
+ end
1360
+ end
1361
+
1362
+ ##
1363
+ # Passes if !`object`.const_defined?(`constant_name`)
1364
+ #
1365
+ # @example
1366
+ # assert_not_const_defined(Object, :Nonexistent) # -> pass
1367
+ # assert_not_const_defined(Test, :Unit) # -> fail
1368
+ def assert_not_const_defined(object, constant_name, message=nil)
1369
+ _wrap_assertion do
1370
+ full_message = build_message(message,
1371
+ "!<?>.const_defined\\?(<?>) expected.",
1372
+ object, constant_name)
1373
+ assert_block(full_message) do
1374
+ !object.const_defined?(constant_name)
1375
+ end
1376
+ end
1377
+ end
1378
+
1379
+ ##
1380
+ # Passes if `object`.`predicate` is _true_.
1381
+ #
1382
+ # @example
1383
+ # assert_predicate([], :empty?) # -> pass
1384
+ # assert_predicate([1], :empty?) # -> fail
1385
+ def assert_predicate(object, predicate, message=nil)
1386
+ _wrap_assertion do
1387
+ assert_respond_to(object, predicate, message)
1388
+ actual = object.__send__(predicate)
1389
+ full_message = build_message(message,
1390
+ "<?>.? is true value expected but was\n" +
1391
+ "<?>",
1392
+ object,
1393
+ AssertionMessage.literal(predicate),
1394
+ actual)
1395
+ assert_block(full_message) do
1396
+ actual
1397
+ end
1398
+ end
1399
+ end
1400
+
1401
+ ##
1402
+ # Passes if `object`.`predicate` is not _true_.
1403
+ #
1404
+ # @example
1405
+ # assert_not_predicate([1], :empty?) # -> pass
1406
+ # assert_not_predicate([], :empty?) # -> fail
1407
+ def assert_not_predicate(object, predicate, message=nil)
1408
+ _wrap_assertion do
1409
+ assert_respond_to(object, predicate, message)
1410
+ actual = object.__send__(predicate)
1411
+ full_message = build_message(message,
1412
+ "<?>.? is false value expected but was\n" +
1413
+ "<?>",
1414
+ object,
1415
+ AssertionMessage.literal(predicate),
1416
+ actual)
1417
+ assert_block(full_message) do
1418
+ not actual
1419
+ end
1420
+ end
1421
+ end
1422
+
1423
+ # Just for minitest compatibility. :<
1424
+ #
1425
+ # @since 3.0.0
1426
+ alias_method :refute_predicate, :assert_not_predicate
1427
+
1428
+ ##
1429
+ # Passes if `object`#`alias_name` is an alias method of
1430
+ # `object`#`original_name`.
1431
+ #
1432
+ # @example
1433
+ # assert_alias_method([], :length, :size) # -> pass
1434
+ # assert_alias_method([], :size, :length) # -> pass
1435
+ # assert_alias_method([], :each, :size) # -> fail
1436
+ def assert_alias_method(object, alias_name, original_name, message=nil)
1437
+ _wrap_assertion do
1438
+ find_method_failure_message = Proc.new do |method_name|
1439
+ build_message(message,
1440
+ "<?>.? doesn't exist\n" +
1441
+ "(Class: <?>)",
1442
+ object,
1443
+ AssertionMessage.literal(method_name),
1444
+ object.class)
1445
+ end
1446
+
1447
+ alias_method = original_method = nil
1448
+ assert_block(find_method_failure_message.call(alias_name)) do
1449
+ begin
1450
+ alias_method = object.method(alias_name)
1451
+ true
1452
+ rescue NameError
1453
+ false
1454
+ end
1455
+ end
1456
+ assert_block(find_method_failure_message.call(original_name)) do
1457
+ begin
1458
+ original_method = object.method(original_name)
1459
+ true
1460
+ rescue NameError
1461
+ false
1462
+ end
1463
+ end
1464
+
1465
+ full_message = build_message(message,
1466
+ "<?> is alias of\n" +
1467