sublimetheme 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/CODE_OF_CONDUCT.md +13 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +230 -0
  9. data/Rakefile +8 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +7 -0
  12. data/lib/sublimetheme.rb +6832 -0
  13. data/lib/sublimetheme/version.rb +3 -0
  14. data/path/bin/htmldiff +25 -0
  15. data/path/bin/htmldiff.bat +6 -0
  16. data/path/bin/ldiff +25 -0
  17. data/path/bin/ldiff.bat +6 -0
  18. data/path/bin/rspec +23 -0
  19. data/path/bin/rspec.bat +6 -0
  20. data/path/cache/diff-lcs-1.2.5.gem +0 -0
  21. data/path/cache/rspec-3.3.0.gem +0 -0
  22. data/path/cache/rspec-core-3.3.2.gem +0 -0
  23. data/path/cache/rspec-expectations-3.3.1.gem +0 -0
  24. data/path/cache/rspec-mocks-3.3.2.gem +0 -0
  25. data/path/cache/rspec-support-3.3.0.gem +0 -0
  26. data/path/gems/diff-lcs-1.2.5/.autotest +3 -0
  27. data/path/gems/diff-lcs-1.2.5/.gemtest +0 -0
  28. data/path/gems/diff-lcs-1.2.5/.hoerc +2 -0
  29. data/path/gems/diff-lcs-1.2.5/.rspec +2 -0
  30. data/path/gems/diff-lcs-1.2.5/.travis.yml +22 -0
  31. data/path/gems/diff-lcs-1.2.5/Contributing.rdoc +64 -0
  32. data/path/gems/diff-lcs-1.2.5/Gemfile +20 -0
  33. data/path/gems/diff-lcs-1.2.5/History.rdoc +152 -0
  34. data/path/gems/diff-lcs-1.2.5/License.rdoc +39 -0
  35. data/path/gems/diff-lcs-1.2.5/Manifest.txt +38 -0
  36. data/path/gems/diff-lcs-1.2.5/README.rdoc +85 -0
  37. data/path/gems/diff-lcs-1.2.5/Rakefile +41 -0
  38. data/path/gems/diff-lcs-1.2.5/autotest/discover.rb +1 -0
  39. data/path/gems/diff-lcs-1.2.5/bin/htmldiff +32 -0
  40. data/path/gems/diff-lcs-1.2.5/bin/ldiff +6 -0
  41. data/path/gems/diff-lcs-1.2.5/docs/COPYING.txt +339 -0
  42. data/path/gems/diff-lcs-1.2.5/docs/artistic.txt +127 -0
  43. data/path/gems/diff-lcs-1.2.5/lib/diff-lcs.rb +3 -0
  44. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs.rb +805 -0
  45. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/array.rb +7 -0
  46. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/block.rb +37 -0
  47. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/callbacks.rb +322 -0
  48. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/change.rb +177 -0
  49. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/htmldiff.rb +149 -0
  50. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/hunk.rb +276 -0
  51. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/internals.rb +301 -0
  52. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/ldiff.rb +195 -0
  53. data/path/gems/diff-lcs-1.2.5/lib/diff/lcs/string.rb +5 -0
  54. data/path/gems/diff-lcs-1.2.5/spec/change_spec.rb +65 -0
  55. data/path/gems/diff-lcs-1.2.5/spec/diff_spec.rb +47 -0
  56. data/path/gems/diff-lcs-1.2.5/spec/hunk_spec.rb +72 -0
  57. data/path/gems/diff-lcs-1.2.5/spec/issues_spec.rb +24 -0
  58. data/path/gems/diff-lcs-1.2.5/spec/lcs_spec.rb +54 -0
  59. data/path/gems/diff-lcs-1.2.5/spec/patch_spec.rb +414 -0
  60. data/path/gems/diff-lcs-1.2.5/spec/sdiff_spec.rb +214 -0
  61. data/path/gems/diff-lcs-1.2.5/spec/spec_helper.rb +290 -0
  62. data/path/gems/diff-lcs-1.2.5/spec/traverse_balanced_spec.rb +310 -0
  63. data/path/gems/diff-lcs-1.2.5/spec/traverse_sequences_spec.rb +139 -0
  64. data/path/gems/rspec-3.3.0/License.txt +24 -0
  65. data/path/gems/rspec-3.3.0/README.md +34 -0
  66. data/path/gems/rspec-3.3.0/lib/rspec.rb +3 -0
  67. data/path/gems/rspec-3.3.0/lib/rspec/version.rb +5 -0
  68. data/path/gems/rspec-core-3.3.2/.document +5 -0
  69. data/path/gems/rspec-core-3.3.2/.yardopts +8 -0
  70. data/path/gems/rspec-core-3.3.2/Changelog.md +1856 -0
  71. data/path/gems/rspec-core-3.3.2/License.txt +25 -0
  72. data/path/gems/rspec-core-3.3.2/README.md +369 -0
  73. data/path/gems/rspec-core-3.3.2/exe/rspec +4 -0
  74. data/path/gems/rspec-core-3.3.2/lib/rspec/autorun.rb +3 -0
  75. data/path/gems/rspec-core-3.3.2/lib/rspec/core.rb +181 -0
  76. data/path/gems/rspec-core-3.3.2/lib/rspec/core/backtrace_formatter.rb +64 -0
  77. data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/coordinator.rb +66 -0
  78. data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/example_minimizer.rb +130 -0
  79. data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/runner.rb +139 -0
  80. data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/server.rb +61 -0
  81. data/path/gems/rspec-core-3.3.2/lib/rspec/core/bisect/subset_enumerator.rb +39 -0
  82. data/path/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb +1807 -0
  83. data/path/gems/rspec-core-3.3.2/lib/rspec/core/configuration_options.rb +191 -0
  84. data/path/gems/rspec-core-3.3.2/lib/rspec/core/drb.rb +111 -0
  85. data/path/gems/rspec-core-3.3.2/lib/rspec/core/dsl.rb +96 -0
  86. data/path/gems/rspec-core-3.3.2/lib/rspec/core/example.rb +573 -0
  87. data/path/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb +796 -0
  88. data/path/gems/rspec-core-3.3.2/lib/rspec/core/example_status_persister.rb +235 -0
  89. data/path/gems/rspec-core-3.3.2/lib/rspec/core/filter_manager.rb +231 -0
  90. data/path/gems/rspec-core-3.3.2/lib/rspec/core/flat_map.rb +20 -0
  91. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters.rb +254 -0
  92. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/base_formatter.rb +70 -0
  93. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/base_text_formatter.rb +77 -0
  94. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/bisect_formatter.rb +68 -0
  95. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/bisect_progress_formatter.rb +115 -0
  96. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/console_codes.rb +65 -0
  97. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/deprecation_formatter.rb +223 -0
  98. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
  99. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/exception_presenter.rb +393 -0
  100. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
  101. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/helpers.rb +109 -0
  102. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/html_formatter.rb +151 -0
  103. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/html_printer.rb +415 -0
  104. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/json_formatter.rb +96 -0
  105. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/profile_formatter.rb +68 -0
  106. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/progress_formatter.rb +28 -0
  107. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/protocol.rb +172 -0
  108. data/path/gems/rspec-core-3.3.2/lib/rspec/core/formatters/snippet_extractor.rb +116 -0
  109. data/path/gems/rspec-core-3.3.2/lib/rspec/core/hooks.rb +638 -0
  110. data/path/gems/rspec-core-3.3.2/lib/rspec/core/memoized_helpers.rb +532 -0
  111. data/path/gems/rspec-core-3.3.2/lib/rspec/core/metadata.rb +490 -0
  112. data/path/gems/rspec-core-3.3.2/lib/rspec/core/metadata_filter.rb +235 -0
  113. data/path/gems/rspec-core-3.3.2/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
  114. data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
  115. data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
  116. data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/null.rb +14 -0
  117. data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/rr.rb +31 -0
  118. data/path/gems/rspec-core-3.3.2/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
  119. data/path/gems/rspec-core-3.3.2/lib/rspec/core/mutex.rb +63 -0
  120. data/path/gems/rspec-core-3.3.2/lib/rspec/core/notifications.rb +498 -0
  121. data/path/gems/rspec-core-3.3.2/lib/rspec/core/option_parser.rb +301 -0
  122. data/path/gems/rspec-core-3.3.2/lib/rspec/core/ordering.rb +158 -0
  123. data/path/gems/rspec-core-3.3.2/lib/rspec/core/pending.rb +165 -0
  124. data/path/gems/rspec-core-3.3.2/lib/rspec/core/profiler.rb +32 -0
  125. data/path/gems/rspec-core-3.3.2/lib/rspec/core/project_initializer.rb +48 -0
  126. data/path/gems/rspec-core-3.3.2/lib/rspec/core/project_initializer/.rspec +2 -0
  127. data/path/gems/rspec-core-3.3.2/lib/rspec/core/project_initializer/spec/spec_helper.rb +96 -0
  128. data/path/gems/rspec-core-3.3.2/lib/rspec/core/rake_task.rb +158 -0
  129. data/path/gems/rspec-core-3.3.2/lib/rspec/core/reentrant_mutex.rb +52 -0
  130. data/path/gems/rspec-core-3.3.2/lib/rspec/core/reporter.rb +220 -0
  131. data/path/gems/rspec-core-3.3.2/lib/rspec/core/ruby_project.rb +53 -0
  132. data/path/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb +179 -0
  133. data/path/gems/rspec-core-3.3.2/lib/rspec/core/sandbox.rb +37 -0
  134. data/path/gems/rspec-core-3.3.2/lib/rspec/core/set.rb +49 -0
  135. data/path/gems/rspec-core-3.3.2/lib/rspec/core/shared_context.rb +55 -0
  136. data/path/gems/rspec-core-3.3.2/lib/rspec/core/shared_example_group.rb +210 -0
  137. data/path/gems/rspec-core-3.3.2/lib/rspec/core/shell_escape.rb +49 -0
  138. data/path/gems/rspec-core-3.3.2/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
  139. data/path/gems/rspec-core-3.3.2/lib/rspec/core/version.rb +9 -0
  140. data/path/gems/rspec-core-3.3.2/lib/rspec/core/warnings.rb +40 -0
  141. data/path/gems/rspec-core-3.3.2/lib/rspec/core/world.rb +178 -0
  142. data/path/gems/rspec-expectations-3.3.1/.document +5 -0
  143. data/path/gems/rspec-expectations-3.3.1/.yardopts +6 -0
  144. data/path/gems/rspec-expectations-3.3.1/Changelog.md +953 -0
  145. data/path/gems/rspec-expectations-3.3.1/License.txt +24 -0
  146. data/path/gems/rspec-expectations-3.3.1/README.md +289 -0
  147. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations.rb +81 -0
  148. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/configuration.rb +164 -0
  149. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/expectation_target.rb +113 -0
  150. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/fail_with.rb +31 -0
  151. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/failure_aggregator.rb +194 -0
  152. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/handler.rb +170 -0
  153. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/minitest_integration.rb +31 -0
  154. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/syntax.rb +132 -0
  155. data/path/gems/rspec-expectations-3.3.1/lib/rspec/expectations/version.rb +8 -0
  156. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers.rb +1009 -0
  157. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/aliased_matcher.rb +116 -0
  158. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in.rb +52 -0
  159. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/all.rb +85 -0
  160. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/base_matcher.rb +181 -0
  161. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be.rb +285 -0
  162. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_between.rb +77 -0
  163. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
  164. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
  165. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/be_within.rb +72 -0
  166. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/change.rb +337 -0
  167. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/compound.rb +293 -0
  168. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/contain_exactly.rb +253 -0
  169. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/cover.rb +24 -0
  170. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/eq.rb +40 -0
  171. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/eql.rb +34 -0
  172. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/equal.rb +81 -0
  173. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/exist.rb +86 -0
  174. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/has.rb +103 -0
  175. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  176. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/include.rb +130 -0
  177. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/match.rb +37 -0
  178. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/operators.rb +128 -0
  179. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/output.rb +200 -0
  180. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/raise_error.rb +216 -0
  181. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/respond_to.rb +90 -0
  182. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/satisfy.rb +37 -0
  183. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  184. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
  185. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/built_in/yield.rb +418 -0
  186. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/composable.rb +184 -0
  187. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/dsl.rb +453 -0
  188. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/english_phrasing.rb +42 -0
  189. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
  190. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/fail_matchers.rb +42 -0
  191. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/generated_descriptions.rb +42 -0
  192. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/matcher_delegator.rb +35 -0
  193. data/path/gems/rspec-expectations-3.3.1/lib/rspec/matchers/matcher_protocol.rb +99 -0
  194. data/path/gems/rspec-mocks-3.3.2/.document +5 -0
  195. data/path/gems/rspec-mocks-3.3.2/.yardopts +6 -0
  196. data/path/gems/rspec-mocks-3.3.2/Changelog.md +965 -0
  197. data/path/gems/rspec-mocks-3.3.2/License.txt +24 -0
  198. data/path/gems/rspec-mocks-3.3.2/README.md +430 -0
  199. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks.rb +126 -0
  200. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance.rb +11 -0
  201. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/chain.rb +110 -0
  202. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
  203. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/expect_chain_chain.rb +35 -0
  204. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/expectation_chain.rb +48 -0
  205. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
  206. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/proxy.rb +116 -0
  207. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/recorder.rb +264 -0
  208. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/stub_chain.rb +46 -0
  209. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/any_instance/stub_chain_chain.rb +27 -0
  210. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/argument_list_matcher.rb +100 -0
  211. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/argument_matchers.rb +320 -0
  212. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/configuration.rb +188 -0
  213. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/error_generator.rb +362 -0
  214. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/example_methods.rb +421 -0
  215. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/instance_method_stasher.rb +135 -0
  216. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/marshal_extension.rb +41 -0
  217. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
  218. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/have_received.rb +116 -0
  219. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/receive.rb +130 -0
  220. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/receive_message_chain.rb +80 -0
  221. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/matchers/receive_messages.rb +75 -0
  222. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/message_chain.rb +87 -0
  223. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/message_expectation.rb +717 -0
  224. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/method_double.rb +287 -0
  225. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/method_reference.rb +192 -0
  226. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/mutate_const.rb +335 -0
  227. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/mutex.rb +73 -0
  228. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/object_reference.rb +149 -0
  229. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/order_group.rb +81 -0
  230. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/proxy.rb +439 -0
  231. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/reentrant_mutex.rb +53 -0
  232. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/space.rb +238 -0
  233. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/standalone.rb +3 -0
  234. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/syntax.rb +325 -0
  235. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/targets.rb +97 -0
  236. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/test_double.rb +170 -0
  237. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/verifying_double.rb +129 -0
  238. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/verifying_message_expecation.rb +54 -0
  239. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/verifying_proxy.rb +213 -0
  240. data/path/gems/rspec-mocks-3.3.2/lib/rspec/mocks/version.rb +9 -0
  241. data/path/gems/rspec-support-3.3.0/Changelog.md +125 -0
  242. data/path/gems/rspec-support-3.3.0/LICENSE.txt +22 -0
  243. data/path/gems/rspec-support-3.3.0/README.md +26 -0
  244. data/path/gems/rspec-support-3.3.0/lib/rspec/support.rb +111 -0
  245. data/path/gems/rspec-support-3.3.0/lib/rspec/support/caller_filter.rb +83 -0
  246. data/path/gems/rspec-support-3.3.0/lib/rspec/support/differ.rb +215 -0
  247. data/path/gems/rspec-support-3.3.0/lib/rspec/support/directory_maker.rb +63 -0
  248. data/path/gems/rspec-support-3.3.0/lib/rspec/support/encoded_string.rb +155 -0
  249. data/path/gems/rspec-support-3.3.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
  250. data/path/gems/rspec-support-3.3.0/lib/rspec/support/hunk_generator.rb +47 -0
  251. data/path/gems/rspec-support-3.3.0/lib/rspec/support/matcher_definition.rb +42 -0
  252. data/path/gems/rspec-support-3.3.0/lib/rspec/support/method_signature_verifier.rb +273 -0
  253. data/path/gems/rspec-support-3.3.0/lib/rspec/support/object_formatter.rb +93 -0
  254. data/path/gems/rspec-support-3.3.0/lib/rspec/support/recursive_const_methods.rb +76 -0
  255. data/path/gems/rspec-support-3.3.0/lib/rspec/support/ruby_features.rb +118 -0
  256. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec.rb +81 -0
  257. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
  258. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/formatting_support.rb +9 -0
  259. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/in_sub_process.rb +52 -0
  260. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/library_wide_checks.rb +145 -0
  261. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/shell_out.rb +71 -0
  262. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
  263. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/string_matcher.rb +46 -0
  264. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/with_isolated_directory.rb +9 -0
  265. data/path/gems/rspec-support-3.3.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
  266. data/path/gems/rspec-support-3.3.0/lib/rspec/support/version.rb +7 -0
  267. data/path/gems/rspec-support-3.3.0/lib/rspec/support/version_checker.rb +53 -0
  268. data/path/gems/rspec-support-3.3.0/lib/rspec/support/warnings.rb +39 -0
  269. data/path/specifications/diff-lcs-1.2.5.gemspec +68 -0
  270. data/path/specifications/rspec-3.3.0.gemspec +42 -0
  271. data/path/specifications/rspec-core-3.3.2.gemspec +68 -0
  272. data/path/specifications/rspec-expectations-3.3.1.gemspec +50 -0
  273. data/path/specifications/rspec-mocks-3.3.2.gemspec +53 -0
  274. data/path/specifications/rspec-support-3.3.0.gemspec +38 -0
  275. data/sublimetheme.gemspec +32 -0
  276. metadata +363 -0
@@ -0,0 +1,414 @@
1
+ # -*- ruby encoding: utf-8 -*-
2
+
3
+ require 'spec_helper'
4
+
5
+ describe "Diff::LCS.patch" do
6
+ include Diff::LCS::SpecHelper::Matchers
7
+
8
+ shared_examples "patch sequences correctly" do
9
+ it "should correctly patch left-to-right (patch autodiscovery)" do
10
+ Diff::LCS.patch(s1, patch_set).should == s2
11
+ end
12
+
13
+ it "should correctly patch left-to-right (explicit patch)" do
14
+ Diff::LCS.patch(s1, patch_set, :patch).should == s2
15
+ Diff::LCS.patch!(s1, patch_set).should == s2
16
+ end
17
+
18
+ it "should correctly patch right-to-left (unpatch autodiscovery)" do
19
+ Diff::LCS.patch(s2, patch_set).should == s1
20
+ end
21
+
22
+ it "should correctly patch right-to-left (explicit unpatch)" do
23
+ Diff::LCS.patch(s2, patch_set, :unpatch).should == s1
24
+ Diff::LCS.unpatch!(s2, patch_set).should == s1
25
+ end
26
+ end
27
+
28
+ describe "using a Diff::LCS.diff patchset" do
29
+ describe "an empty patchset returns the source" do
30
+ it "works on a string (hello)" do
31
+ Diff::LCS::patch(hello, Diff::LCS.diff(hello, hello)).should == hello
32
+ end
33
+
34
+ it "works on an array %W(h e l l o)" do
35
+ Diff::LCS::patch(hello_ary, Diff::LCS.diff(hello_ary, hello_ary)).should == hello_ary
36
+ end
37
+ end
38
+
39
+ describe "with default diff callbacks (DiffCallbacks)" do
40
+ describe "forward (s1 -> s2)" do
41
+ it_has_behavior "patch sequences correctly" do
42
+ let(:s1) { seq1 }
43
+ let(:s2) { seq2 }
44
+ let(:patch_set) { Diff::LCS.diff(seq1, seq2) }
45
+ end
46
+ end
47
+
48
+ describe "reverse (s2 -> s1)" do
49
+ it_has_behavior "patch sequences correctly" do
50
+ let(:s1) { seq2 }
51
+ let(:s2) { seq1 }
52
+ let(:patch_set) { Diff::LCS.diff(seq2, seq1) }
53
+ end
54
+ end
55
+ end
56
+
57
+ describe "with context diff callbacks (ContextDiffCallbacks)" do
58
+ describe "forward (s1 -> s2)" do
59
+ it_has_behavior "patch sequences correctly" do
60
+ let(:s1) { seq1 }
61
+ let(:s2) { seq2 }
62
+ let(:patch_set) {
63
+ Diff::LCS.diff(seq1, seq2, Diff::LCS::ContextDiffCallbacks)
64
+ }
65
+ end
66
+ end
67
+
68
+ describe "reverse (s2 -> s1)" do
69
+ it_has_behavior "patch sequences correctly" do
70
+ let(:s1) { seq2 }
71
+ let(:s2) { seq1 }
72
+ let(:patch_set) {
73
+ Diff::LCS.diff(seq2, seq1, Diff::LCS::ContextDiffCallbacks)
74
+ }
75
+ end
76
+ end
77
+ end
78
+
79
+ describe "with sdiff callbacks (SDiffCallbacks)" do
80
+ describe "forward (s1 -> s2)" do
81
+ it_has_behavior "patch sequences correctly" do
82
+ let(:s1) { seq1 }
83
+ let(:s2) { seq2 }
84
+ let(:patch_set) {
85
+ Diff::LCS.diff(seq1, seq2, Diff::LCS::SDiffCallbacks)
86
+ }
87
+ end
88
+ end
89
+
90
+ describe "reverse (s2 -> s1)" do
91
+ it_has_behavior "patch sequences correctly" do
92
+ let(:s1) { seq2 }
93
+ let(:s2) { seq1 }
94
+ let(:patch_set) {
95
+ Diff::LCS.diff(seq2, seq1, Diff::LCS::SDiffCallbacks)
96
+ }
97
+ end
98
+ end
99
+ end
100
+ end
101
+
102
+ describe "using a Diff::LCS.sdiff patchset" do
103
+ describe "an empty patchset returns the source" do
104
+ it "works on a string (hello)" do
105
+ Diff::LCS::patch(hello, Diff::LCS.sdiff(hello, hello)).should == hello
106
+ end
107
+
108
+ it "works on an array %W(h e l l o)" do
109
+ Diff::LCS::patch(hello_ary, Diff::LCS.sdiff(hello_ary, hello_ary)).should == hello_ary
110
+ end
111
+ end
112
+
113
+ describe "with default diff callbacks (DiffCallbacks)" do
114
+ describe "forward (s1 -> s2)" do
115
+ it_has_behavior "patch sequences correctly" do
116
+ let(:s1) { seq1 }
117
+ let(:s2) { seq2 }
118
+ let(:patch_set) {
119
+ Diff::LCS.sdiff(seq1, seq2, Diff::LCS::DiffCallbacks)
120
+ }
121
+ end
122
+ end
123
+
124
+ describe "reverse (s2 -> s1)" do
125
+ it_has_behavior "patch sequences correctly" do
126
+ let(:s1) { seq2 }
127
+ let(:s2) { seq1 }
128
+ let(:patch_set) {
129
+ Diff::LCS.sdiff(seq2, seq1, Diff::LCS::DiffCallbacks)
130
+ }
131
+ end
132
+ end
133
+ end
134
+
135
+ describe "with context diff callbacks (DiffCallbacks)" do
136
+ describe "forward (s1 -> s2)" do
137
+ it_has_behavior "patch sequences correctly" do
138
+ let(:s1) { seq1 }
139
+ let(:s2) { seq2 }
140
+ let(:patch_set) {
141
+ Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks)
142
+ }
143
+ end
144
+ end
145
+
146
+ describe "reverse (s2 -> s1)" do
147
+ it_has_behavior "patch sequences correctly" do
148
+ let(:s1) { seq2 }
149
+ let(:s2) { seq1 }
150
+ let(:patch_set) {
151
+ Diff::LCS.sdiff(seq2, seq1, Diff::LCS::ContextDiffCallbacks)
152
+ }
153
+ end
154
+ end
155
+ end
156
+
157
+ describe "with sdiff callbacks (SDiffCallbacks)" do
158
+ describe "forward (s1 -> s2)" do
159
+ it_has_behavior "patch sequences correctly" do
160
+ let(:s1) { seq1 }
161
+ let(:s2) { seq2 }
162
+ let(:patch_set) { Diff::LCS.sdiff(seq1, seq2) }
163
+ end
164
+ end
165
+
166
+ describe "reverse (s2 -> s1)" do
167
+ it_has_behavior "patch sequences correctly" do
168
+ let(:s1) { seq2 }
169
+ let(:s2) { seq1 }
170
+ let(:patch_set) { Diff::LCS.sdiff(seq2, seq1) }
171
+ end
172
+ end
173
+ end
174
+ end
175
+
176
+ # Note: because of the error in autodiscovery ("does not autodiscover s1
177
+ # to s2 patches"), this cannot use the "patch sequences correctly" shared
178
+ # set. Once the bug in autodiscovery is fixed, this can be converted as
179
+ # above.
180
+ describe "fix bug 891: patchsets do not contain the last equal part" do
181
+ before(:each) do
182
+ @s1 = %w(a b c d e f g h i j k)
183
+ @s2 = %w(a b c d D e f g h i j k)
184
+ end
185
+
186
+ describe "using Diff::LCS.diff with default diff callbacks" do
187
+ before(:each) do
188
+ @patch_set_s1_s2 = Diff::LCS.diff(@s1, @s2)
189
+ @patch_set_s2_s1 = Diff::LCS.diff(@s2, @s1)
190
+ end
191
+
192
+ it "should autodiscover s1 to s2 patches" do
193
+ expect do
194
+ Diff::LCS.patch(@s1, @patch_set_s1_s2).should == @s2
195
+ end.to_not raise_error(RuntimeError, /provided patchset/)
196
+ end
197
+
198
+ it "should autodiscover s2 to s1 patches" do
199
+ expect do
200
+ Diff::LCS.patch(@s1, @patch_set_s2_s1).should == @s2
201
+ end.to_not raise_error(RuntimeError, /provided patchset/)
202
+ end
203
+
204
+ it "should autodiscover s2 to s1 the left-to-right patches" do
205
+ Diff::LCS.patch(@s2, @patch_set_s2_s1).should == @s1
206
+ Diff::LCS.patch(@s2, @patch_set_s1_s2).should == @s1
207
+ end
208
+
209
+ it "should correctly patch left-to-right (explicit patch)" do
210
+ Diff::LCS.patch(@s1, @patch_set_s1_s2, :patch).should == @s2
211
+ Diff::LCS.patch(@s2, @patch_set_s2_s1, :patch).should == @s1
212
+ Diff::LCS.patch!(@s1, @patch_set_s1_s2).should == @s2
213
+ Diff::LCS.patch!(@s2, @patch_set_s2_s1).should == @s1
214
+ end
215
+
216
+ it "should correctly patch right-to-left (explicit unpatch)" do
217
+ Diff::LCS.patch(@s2, @patch_set_s1_s2, :unpatch).should == @s1
218
+ Diff::LCS.patch(@s1, @patch_set_s2_s1, :unpatch).should == @s2
219
+ Diff::LCS.unpatch!(@s2, @patch_set_s1_s2).should == @s1
220
+ Diff::LCS.unpatch!(@s1, @patch_set_s2_s1).should == @s2
221
+ end
222
+ end
223
+
224
+ describe "using Diff::LCS.diff with context diff callbacks" do
225
+ before(:each) do
226
+ @patch_set_s1_s2 = Diff::LCS.diff(@s1, @s2, Diff::LCS::ContextDiffCallbacks)
227
+ @patch_set_s2_s1 = Diff::LCS.diff(@s2, @s1, Diff::LCS::ContextDiffCallbacks)
228
+ end
229
+
230
+ it "should autodiscover s1 to s2 patches" do
231
+ expect do
232
+ Diff::LCS.patch(@s1, @patch_set_s1_s2).should == @s2
233
+ end.to_not raise_error(RuntimeError, /provided patchset/)
234
+ end
235
+
236
+ it "should autodiscover s2 to s1 patches" do
237
+ expect do
238
+ Diff::LCS.patch(@s1, @patch_set_s2_s1).should == @s2
239
+ end.to_not raise_error(RuntimeError, /provided patchset/)
240
+ end
241
+
242
+ it "should autodiscover s2 to s1 the left-to-right patches" do
243
+ Diff::LCS.patch(@s2, @patch_set_s2_s1).should == @s1
244
+ Diff::LCS.patch(@s2, @patch_set_s1_s2).should == @s1
245
+ end
246
+
247
+ it "should correctly patch left-to-right (explicit patch)" do
248
+ Diff::LCS.patch(@s1, @patch_set_s1_s2, :patch).should == @s2
249
+ Diff::LCS.patch(@s2, @patch_set_s2_s1, :patch).should == @s1
250
+ Diff::LCS.patch!(@s1, @patch_set_s1_s2).should == @s2
251
+ Diff::LCS.patch!(@s2, @patch_set_s2_s1).should == @s1
252
+ end
253
+
254
+ it "should correctly patch right-to-left (explicit unpatch)" do
255
+ Diff::LCS.patch(@s2, @patch_set_s1_s2, :unpatch).should == @s1
256
+ Diff::LCS.patch(@s1, @patch_set_s2_s1, :unpatch).should == @s2
257
+ Diff::LCS.unpatch!(@s2, @patch_set_s1_s2).should == @s1
258
+ Diff::LCS.unpatch!(@s1, @patch_set_s2_s1).should == @s2
259
+ end
260
+ end
261
+
262
+ describe "using Diff::LCS.diff with sdiff callbacks" do
263
+ before(:each) do
264
+ @patch_set_s1_s2 = Diff::LCS.diff(@s1, @s2, Diff::LCS::SDiffCallbacks)
265
+ @patch_set_s2_s1 = Diff::LCS.diff(@s2, @s1, Diff::LCS::SDiffCallbacks)
266
+ end
267
+
268
+ it "should autodiscover s1 to s2 patches" do
269
+ expect do
270
+ Diff::LCS.patch(@s1, @patch_set_s1_s2).should == @s2
271
+ end.to_not raise_error(RuntimeError, /provided patchset/)
272
+ end
273
+
274
+ it "should autodiscover s2 to s1 patches" do
275
+ expect do
276
+ Diff::LCS.patch(@s1, @patch_set_s2_s1).should == @s2
277
+ end.to_not raise_error(RuntimeError, /provided patchset/)
278
+ end
279
+
280
+ it "should autodiscover s2 to s1 the left-to-right patches" do
281
+ Diff::LCS.patch(@s2, @patch_set_s2_s1).should == @s1
282
+ Diff::LCS.patch(@s2, @patch_set_s1_s2).should == @s1
283
+ end
284
+
285
+ it "should correctly patch left-to-right (explicit patch)" do
286
+ Diff::LCS.patch(@s1, @patch_set_s1_s2, :patch).should == @s2
287
+ Diff::LCS.patch(@s2, @patch_set_s2_s1, :patch).should == @s1
288
+ Diff::LCS.patch!(@s1, @patch_set_s1_s2).should == @s2
289
+ Diff::LCS.patch!(@s2, @patch_set_s2_s1).should == @s1
290
+ end
291
+
292
+ it "should correctly patch right-to-left (explicit unpatch)" do
293
+ Diff::LCS.patch(@s2, @patch_set_s1_s2, :unpatch).should == @s1
294
+ Diff::LCS.patch(@s1, @patch_set_s2_s1, :unpatch).should == @s2
295
+ Diff::LCS.unpatch!(@s2, @patch_set_s1_s2).should == @s1
296
+ Diff::LCS.unpatch!(@s1, @patch_set_s2_s1).should == @s2
297
+ end
298
+ end
299
+
300
+ describe "using Diff::LCS.sdiff with default sdiff callbacks" do
301
+ before(:each) do
302
+ @patch_set_s1_s2 = Diff::LCS.sdiff(@s1, @s2)
303
+ @patch_set_s2_s1 = Diff::LCS.sdiff(@s2, @s1)
304
+ end
305
+
306
+ it "should autodiscover s1 to s2 patches" do
307
+ expect do
308
+ Diff::LCS.patch(@s1, @patch_set_s1_s2).should == @s2
309
+ end.to_not raise_error(RuntimeError, /provided patchset/)
310
+ end
311
+
312
+ it "should autodiscover s2 to s1 patches" do
313
+ expect do
314
+ Diff::LCS.patch(@s1, @patch_set_s2_s1).should == @s2
315
+ end.to_not raise_error(RuntimeError, /provided patchset/)
316
+ end
317
+
318
+ it "should autodiscover s2 to s1 the left-to-right patches" do
319
+ Diff::LCS.patch(@s2, @patch_set_s2_s1).should == @s1
320
+ Diff::LCS.patch(@s2, @patch_set_s1_s2).should == @s1
321
+ end
322
+
323
+ it "should correctly patch left-to-right (explicit patch)", :only => true do
324
+ Diff::LCS.patch(@s1, @patch_set_s1_s2, :patch).should == @s2
325
+ Diff::LCS.patch(@s2, @patch_set_s2_s1, :patch).should == @s1
326
+ Diff::LCS.patch!(@s1, @patch_set_s1_s2).should == @s2
327
+ Diff::LCS.patch!(@s2, @patch_set_s2_s1).should == @s1
328
+ end
329
+
330
+ it "should correctly patch right-to-left (explicit unpatch)" do
331
+ Diff::LCS.patch(@s2, @patch_set_s1_s2, :unpatch).should == @s1
332
+ Diff::LCS.patch(@s1, @patch_set_s2_s1, :unpatch).should == @s2
333
+ Diff::LCS.unpatch!(@s2, @patch_set_s1_s2).should == @s1
334
+ Diff::LCS.unpatch!(@s1, @patch_set_s2_s1).should == @s2
335
+ end
336
+ end
337
+
338
+ describe "using Diff::LCS.sdiff with context diff callbacks" do
339
+ before(:each) do
340
+ @patch_set_s1_s2 = Diff::LCS.sdiff(@s1, @s2, Diff::LCS::ContextDiffCallbacks)
341
+ @patch_set_s2_s1 = Diff::LCS.sdiff(@s2, @s1, Diff::LCS::ContextDiffCallbacks)
342
+ end
343
+
344
+ it "should autodiscover s1 to s2 patches" do
345
+ expect do
346
+ Diff::LCS.patch(@s1, @patch_set_s1_s2).should == @s2
347
+ end.to_not raise_error(RuntimeError, /provided patchset/)
348
+ end
349
+
350
+ it "should autodiscover s2 to s1 patches" do
351
+ expect do
352
+ Diff::LCS.patch(@s1, @patch_set_s2_s1).should == @s2
353
+ end.to_not raise_error(RuntimeError, /provided patchset/)
354
+ end
355
+
356
+ it "should autodiscover s2 to s1 the left-to-right patches" do
357
+ Diff::LCS.patch(@s2, @patch_set_s2_s1).should == @s1
358
+ Diff::LCS.patch(@s2, @patch_set_s1_s2).should == @s1
359
+ end
360
+
361
+ it "should correctly patch left-to-right (explicit patch)" do
362
+ Diff::LCS.patch(@s1, @patch_set_s1_s2, :patch).should == @s2
363
+ Diff::LCS.patch(@s2, @patch_set_s2_s1, :patch).should == @s1
364
+ Diff::LCS.patch!(@s1, @patch_set_s1_s2).should == @s2
365
+ Diff::LCS.patch!(@s2, @patch_set_s2_s1).should == @s1
366
+ end
367
+
368
+ it "should correctly patch right-to-left (explicit unpatch)" do
369
+ Diff::LCS.patch(@s2, @patch_set_s1_s2, :unpatch).should == @s1
370
+ Diff::LCS.patch(@s1, @patch_set_s2_s1, :unpatch).should == @s2
371
+ Diff::LCS.unpatch!(@s2, @patch_set_s1_s2).should == @s1
372
+ Diff::LCS.unpatch!(@s1, @patch_set_s2_s1).should == @s2
373
+ end
374
+ end
375
+
376
+ describe "using Diff::LCS.sdiff with default diff callbacks" do
377
+ before(:each) do
378
+ @patch_set_s1_s2 = Diff::LCS.sdiff(@s1, @s2, Diff::LCS::DiffCallbacks)
379
+ @patch_set_s2_s1 = Diff::LCS.sdiff(@s2, @s1, Diff::LCS::DiffCallbacks)
380
+ end
381
+
382
+ it "should autodiscover s1 to s2 patches" do
383
+ expect do
384
+ Diff::LCS.patch(@s1, @patch_set_s1_s2).should == @s2
385
+ end.to_not raise_error(RuntimeError, /provided patchset/)
386
+ end
387
+
388
+ it "should autodiscover s2 to s1 patches" do
389
+ expect do
390
+ Diff::LCS.patch(@s1, @patch_set_s2_s1).should == @s2
391
+ end.to_not raise_error(RuntimeError, /provided patchset/)
392
+ end
393
+
394
+ it "should autodiscover s2 to s1 the left-to-right patches" do
395
+ Diff::LCS.patch(@s2, @patch_set_s2_s1).should == @s1
396
+ Diff::LCS.patch(@s2, @patch_set_s1_s2).should == @s1
397
+ end
398
+
399
+ it "should correctly patch left-to-right (explicit patch)" do
400
+ Diff::LCS.patch(@s1, @patch_set_s1_s2, :patch).should == @s2
401
+ Diff::LCS.patch(@s2, @patch_set_s2_s1, :patch).should == @s1
402
+ Diff::LCS.patch!(@s1, @patch_set_s1_s2).should == @s2
403
+ Diff::LCS.patch!(@s2, @patch_set_s2_s1).should == @s1
404
+ end
405
+
406
+ it "should correctly patch right-to-left (explicit unpatch)" do
407
+ Diff::LCS.patch(@s2, @patch_set_s1_s2, :unpatch).should == @s1
408
+ Diff::LCS.patch(@s1, @patch_set_s2_s1, :unpatch).should == @s2
409
+ Diff::LCS.unpatch!(@s2, @patch_set_s1_s2).should == @s1
410
+ Diff::LCS.unpatch!(@s1, @patch_set_s2_s1).should == @s2
411
+ end
412
+ end
413
+ end
414
+ end
@@ -0,0 +1,214 @@
1
+ # -*- ruby encoding: utf-8 -*-
2
+
3
+ require 'spec_helper'
4
+
5
+ describe "Diff::LCS.sdiff" do
6
+ include Diff::LCS::SpecHelper::Matchers
7
+
8
+ shared_examples "compare sequences correctly" do
9
+ it "should compare s1 -> s2 correctly" do
10
+ Diff::LCS.sdiff(s1, s2).should == context_diff(result)
11
+ end
12
+
13
+ it "should compare s2 -> s1 correctly" do
14
+ Diff::LCS.sdiff(s2, s1).should == context_diff(reverse_sdiff(result))
15
+ end
16
+ end
17
+
18
+ describe "using seq1 & seq2" do
19
+ let(:s1) { seq1 }
20
+ let(:s2) { seq2 }
21
+ let(:result) { correct_forward_sdiff }
22
+
23
+ it_has_behavior "compare sequences correctly"
24
+ end
25
+
26
+ describe "using %w(abc def yyy xxx ghi jkl) & %w(abc dxf xxx ghi jkl)" do
27
+ let(:s1) { %w(abc def yyy xxx ghi jkl) }
28
+ let(:s2) { %w(abc dxf xxx ghi jkl) }
29
+ let(:result) {
30
+ [
31
+ [ '=', [ 0, 'abc' ], [ 0, 'abc' ] ],
32
+ [ '!', [ 1, 'def' ], [ 1, 'dxf' ] ],
33
+ [ '-', [ 2, 'yyy' ], [ 2, nil ] ],
34
+ [ '=', [ 3, 'xxx' ], [ 2, 'xxx' ] ],
35
+ [ '=', [ 4, 'ghi' ], [ 3, 'ghi' ] ],
36
+ [ '=', [ 5, 'jkl' ], [ 4, 'jkl' ] ]
37
+ ]
38
+ }
39
+
40
+ it_has_behavior "compare sequences correctly"
41
+ end
42
+
43
+ describe "using %w(a b c d e) & %w(a e)" do
44
+ let(:s1) { %w(a b c d e) }
45
+ let(:s2) { %w(a e) }
46
+ let(:result) {
47
+ [
48
+ [ '=', [ 0, 'a' ], [ 0, 'a' ] ],
49
+ [ '-', [ 1, 'b' ], [ 1, nil ] ],
50
+ [ '-', [ 2, 'c' ], [ 1, nil ] ],
51
+ [ '-', [ 3, 'd' ], [ 1, nil ] ],
52
+ [ '=', [ 4, 'e' ], [ 1, 'e' ] ]
53
+ ]
54
+ }
55
+
56
+ it_has_behavior "compare sequences correctly"
57
+ end
58
+
59
+ describe "using %w(a e) & %w(a b c d e)" do
60
+ let(:s1) { %w(a e) }
61
+ let(:s2) { %w(a b c d e) }
62
+ let(:result) {
63
+ [
64
+ [ '=', [ 0, 'a' ], [ 0, 'a' ] ],
65
+ [ '+', [ 1, nil ], [ 1, 'b' ] ],
66
+ [ '+', [ 1, nil ], [ 2, 'c' ] ],
67
+ [ '+', [ 1, nil ], [ 3, 'd' ] ],
68
+ [ '=', [ 1, 'e' ], [ 4, 'e' ] ]
69
+ ]
70
+ }
71
+
72
+ it_has_behavior "compare sequences correctly"
73
+ end
74
+
75
+ describe "using %w(v x a e) & %w(w y a b c d e)" do
76
+ let(:s1) { %w(v x a e) }
77
+ let(:s2) { %w(w y a b c d e) }
78
+ let(:result) {
79
+ [
80
+ [ '!', [ 0, 'v' ], [ 0, 'w' ] ],
81
+ [ '!', [ 1, 'x' ], [ 1, 'y' ] ],
82
+ [ '=', [ 2, 'a' ], [ 2, 'a' ] ],
83
+ [ '+', [ 3, nil ], [ 3, 'b' ] ],
84
+ [ '+', [ 3, nil ], [ 4, 'c' ] ],
85
+ [ '+', [ 3, nil ], [ 5, 'd' ] ],
86
+ [ '=', [ 3, 'e' ], [ 6, 'e' ] ]
87
+ ]
88
+ }
89
+
90
+ it_has_behavior "compare sequences correctly"
91
+ end
92
+
93
+ describe "using %w(x a e) & %w(a b c d e)" do
94
+ let(:s1) { %w(x a e) }
95
+ let(:s2) { %w(a b c d e) }
96
+ let(:result) {
97
+ [
98
+ [ '-', [ 0, 'x' ], [ 0, nil ] ],
99
+ [ '=', [ 1, 'a' ], [ 0, 'a' ] ],
100
+ [ '+', [ 2, nil ], [ 1, 'b' ] ],
101
+ [ '+', [ 2, nil ], [ 2, 'c' ] ],
102
+ [ '+', [ 2, nil ], [ 3, 'd' ] ],
103
+ [ '=', [ 2, 'e' ], [ 4, 'e' ] ]
104
+ ]
105
+ }
106
+
107
+ it_has_behavior "compare sequences correctly"
108
+ end
109
+
110
+ describe "using %w(a e) & %w(x a b c d e)" do
111
+ let(:s1) { %w(a e) }
112
+ let(:s2) { %w(x a b c d e) }
113
+ let(:result) {
114
+ [
115
+ [ '+', [ 0, nil ], [ 0, 'x' ] ],
116
+ [ '=', [ 0, 'a' ], [ 1, 'a' ] ],
117
+ [ '+', [ 1, nil ], [ 2, 'b' ] ],
118
+ [ '+', [ 1, nil ], [ 3, 'c' ] ],
119
+ [ '+', [ 1, nil ], [ 4, 'd' ] ],
120
+ [ '=', [ 1, 'e' ], [ 5, 'e' ] ]
121
+ ]
122
+ }
123
+
124
+ it_has_behavior "compare sequences correctly"
125
+ end
126
+
127
+ describe "using %w(a e v) & %w(x a b c d e w x)" do
128
+ let(:s1) { %w(a e v) }
129
+ let(:s2) { %w(x a b c d e w x) }
130
+ let(:result) {
131
+ [
132
+ [ '+', [ 0, nil ], [ 0, 'x' ] ],
133
+ [ '=', [ 0, 'a' ], [ 1, 'a' ] ],
134
+ [ '+', [ 1, nil ], [ 2, 'b' ] ],
135
+ [ '+', [ 1, nil ], [ 3, 'c' ] ],
136
+ [ '+', [ 1, nil ], [ 4, 'd' ] ],
137
+ [ '=', [ 1, 'e' ], [ 5, 'e' ] ],
138
+ [ '!', [ 2, 'v' ], [ 6, 'w' ] ],
139
+ [ '+', [ 3, nil ], [ 7, 'x' ] ]
140
+ ]
141
+ }
142
+
143
+ it_has_behavior "compare sequences correctly"
144
+ end
145
+
146
+ describe "using %w() & %w(a b c)" do
147
+ let(:s1) { %w() }
148
+ let(:s2) { %w(a b c) }
149
+ let(:result) {
150
+ [
151
+ [ '+', [ 0, nil ], [ 0, 'a' ] ],
152
+ [ '+', [ 0, nil ], [ 1, 'b' ] ],
153
+ [ '+', [ 0, nil ], [ 2, 'c' ] ]
154
+ ]
155
+ }
156
+
157
+ it_has_behavior "compare sequences correctly"
158
+ end
159
+
160
+ describe "using %w(a b c) & %w(1)" do
161
+ let(:s1) { %w(a b c) }
162
+ let(:s2) { %w(1) }
163
+ let(:result) {
164
+ [
165
+ [ '!', [ 0, 'a' ], [ 0, '1' ] ],
166
+ [ '-', [ 1, 'b' ], [ 1, nil ] ],
167
+ [ '-', [ 2, 'c' ], [ 1, nil ] ]
168
+ ]
169
+ }
170
+
171
+ it_has_behavior "compare sequences correctly"
172
+ end
173
+
174
+ describe "using %w(a b c) & %w(c)" do
175
+ let(:s1) { %w(a b c) }
176
+ let(:s2) { %w(c) }
177
+ let(:result) {
178
+ [
179
+ [ '-', [ 0, 'a' ], [ 0, nil ] ],
180
+ [ '-', [ 1, 'b' ], [ 0, nil ] ],
181
+ [ '=', [ 2, 'c' ], [ 0, 'c' ] ]
182
+ ]
183
+ }
184
+
185
+ it_has_behavior "compare sequences correctly"
186
+ end
187
+
188
+ describe "using %w(abcd efgh ijkl mnop) & []" do
189
+ let(:s1) { %w(abcd efgh ijkl mnop) }
190
+ let(:s2) { [] }
191
+ let(:result) {
192
+ [
193
+ [ '-', [ 0, 'abcd' ], [ 0, nil ] ],
194
+ [ '-', [ 1, 'efgh' ], [ 0, nil ] ],
195
+ [ '-', [ 2, 'ijkl' ], [ 0, nil ] ],
196
+ [ '-', [ 3, 'mnop' ], [ 0, nil ] ]
197
+ ]
198
+ }
199
+
200
+ it_has_behavior "compare sequences correctly"
201
+ end
202
+
203
+ describe "using [[1,2]] & []" do
204
+ let(:s1) { [ [ 1, 2 ] ] }
205
+ let(:s2) { [] }
206
+ let(:result) {
207
+ [
208
+ [ '-', [ 0, [ 1, 2 ] ], [ 0, nil ] ]
209
+ ]
210
+ }
211
+
212
+ it_has_behavior "compare sequences correctly"
213
+ end
214
+ end