sublimetheme 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,24 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2012 David Chelimsky, Myron Marston
4
+ Copyright (c) 2006 David Chelimsky, The RSpec Development Team
5
+ Copyright (c) 2005 Steven Baker
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining
8
+ a copy of this software and associated documentation files (the
9
+ "Software"), to deal in the Software without restriction, including
10
+ without limitation the rights to use, copy, modify, merge, publish,
11
+ distribute, sublicense, and/or sell copies of the Software, and to
12
+ permit persons to whom the Software is furnished to do so, subject to
13
+ the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be
16
+ included in all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,430 @@
1
+ # RSpec Mocks [![Build Status](https://secure.travis-ci.org/rspec/rspec-mocks.svg?branch=master)](http://travis-ci.org/rspec/rspec-mocks) [![Code Climate](https://codeclimate.com/github/rspec/rspec-mocks.svg)](https://codeclimate.com/github/rspec/rspec-mocks)
2
+ rspec-mocks is a test-double framework for rspec with support for method stubs,
3
+ fakes, and message expectations on generated test-doubles and real objects
4
+ alike.
5
+
6
+ ## Install
7
+
8
+ gem install rspec # for rspec-core, rspec-expectations, rspec-mocks
9
+ gem install rspec-mocks # for rspec-mocks only
10
+
11
+ Want to run against the `master` branch? You'll need to include the dependent
12
+ RSpec repos as well. Add the following to your `Gemfile`:
13
+
14
+ ```ruby
15
+ %w[rspec-core rspec-expectations rspec-mocks rspec-support].each do |lib|
16
+ gem lib, :git => "git://github.com/rspec/#{lib}.git", :branch => 'master'
17
+ end
18
+ ```
19
+
20
+ ## Test Doubles
21
+
22
+ A test double is an object that stands in for another object in your system
23
+ during a code example. Use the `double` method, passing in an optional identifier, to create one:
24
+
25
+ ```ruby
26
+ book = double("book")
27
+ ```
28
+
29
+ Most of the time you will want some confidence that your doubles resemble an
30
+ existing object in your system. Verifying doubles are provided for this
31
+ purpose. If the existing object is available, they will prevent you from adding
32
+ stubs and expectations for methods that do not exist or that have an invalid
33
+ number of parameters.
34
+
35
+ ```ruby
36
+ book = instance_double("Book", :pages => 250)
37
+ ```
38
+
39
+ Verifying doubles have some clever tricks to enable you to both test in
40
+ isolation without your dependencies loaded while still being able to validate
41
+ them against real objects. More detail is available in [their
42
+ documentation](https://github.com/rspec/rspec-mocks/blob/master/features/verifying_doubles).
43
+
44
+ Verifying doubles can also accept custom identifiers, just like double(), e.g.:
45
+
46
+ ```ruby
47
+ books = []
48
+ books << instance_double("Book", :rspec_book, :pages => 250)
49
+ books << instance_double("Book", "(Untitled)", :pages => 5000)
50
+
51
+ puts books.inspect # with names, it's clearer which were actually added
52
+ ```
53
+
54
+ ## Method Stubs
55
+
56
+ A method stub is an implementation that returns a pre-determined value. Method
57
+ stubs can be declared on test doubles or real objects using the same syntax.
58
+ rspec-mocks supports 3 forms for declaring method stubs:
59
+
60
+ ```ruby
61
+ allow(book).to receive(:title) { "The RSpec Book" }
62
+ allow(book).to receive(:title).and_return("The RSpec Book")
63
+ allow(book).to receive_messages(
64
+ :title => "The RSpec Book",
65
+ :subtitle => "Behaviour-Driven Development with RSpec, Cucumber, and Friends")
66
+ ```
67
+
68
+ You can also use this shortcut, which creates a test double and declares a
69
+ method stub in one statement:
70
+
71
+ ```ruby
72
+ book = double("book", :title => "The RSpec Book")
73
+ ```
74
+
75
+ The first argument is a name, which is used for documentation and appears in
76
+ failure messages. If you don't care about the name, you can leave it out,
77
+ making the combined instantiation/stub declaration very terse:
78
+
79
+ ```ruby
80
+ double(:foo => 'bar')
81
+ ```
82
+
83
+ This is particularly nice when providing a list of test doubles to a method
84
+ that iterates through them:
85
+
86
+ ```ruby
87
+ order.calculate_total_price(double(:price => 1.99), double(:price => 2.99))
88
+ ```
89
+
90
+ ## Consecutive return values
91
+
92
+ When a stub might be invoked more than once, you can provide additional
93
+ arguments to `and_return`. The invocations cycle through the list. The last
94
+ value is returned for any subsequent invocations:
95
+
96
+ ```ruby
97
+ allow(die).to receive(:roll).and_return(1, 2, 3)
98
+ die.roll # => 1
99
+ die.roll # => 2
100
+ die.roll # => 3
101
+ die.roll # => 3
102
+ die.roll # => 3
103
+ ```
104
+
105
+ To return an array in a single invocation, declare an array:
106
+
107
+ ```ruby
108
+ allow(team).to receive(:players).and_return([double(:name => "David")])
109
+ ```
110
+
111
+ ## Message Expectations
112
+
113
+ A message expectation is an expectation that the test double will receive a
114
+ message some time before the example ends. If the message is received, the
115
+ expectation is satisfied. If not, the example fails.
116
+
117
+ ```ruby
118
+ validator = double("validator")
119
+ expect(validator).to receive(:validate) { "02134" }
120
+ zipcode = Zipcode.new("02134", validator)
121
+ zipcode.valid?
122
+ ```
123
+
124
+ ## Test Spies
125
+
126
+ Verifies the given object received the expected message during the course of
127
+ the test. For a message to be verified, the given object must be setup to spy
128
+ on it, either by having it explicitly stubbed or by being a null object double
129
+ (e.g. `double(...).as_null_object`). Convenience methods are provided to easily
130
+ create null object doubles for this purpose:
131
+
132
+ ```ruby
133
+ spy("invitation") # => same as `double("invitation").as_null_object`
134
+ instance_spy("Invitation") # => same as `instance_double("Invitation").as_null_object`
135
+ class_spy("Invitation") # => same as `class_double("Invitation").as_null_object`
136
+ object_spy("Invitation") # => same as `object_double("Invitation").as_null_object`
137
+ ```
138
+
139
+ Verifying messages received in this way implements the Test Spy pattern.
140
+
141
+ ```ruby
142
+ invitation = spy('invitation')
143
+
144
+ user.accept_invitation(invitation)
145
+
146
+ expect(invitation).to have_received(:accept)
147
+
148
+ # You can also use other common message expectations. For example:
149
+ expect(invitation).to have_received(:accept).with(mailer)
150
+ expect(invitation).to have_received(:accept).twice
151
+ expect(invitation).to_not have_received(:accept).with(mailer)
152
+
153
+ # One can specify a return value on the spy the same way one would a double.
154
+ invitation = spy('invitation', :accept => true)
155
+ expect(invitation).to have_received(:accept).with(mailer)
156
+ expect(invitation.accept).to eq(true)
157
+ ```
158
+
159
+ Note that `have_received(...).with(...)` is unable to work properly when
160
+ passed arguments are mutated after the spy records the received message.
161
+ For example, this does not work properly:
162
+
163
+ ```ruby
164
+ greeter = spy("greeter")
165
+
166
+ message = "Hello"
167
+ greeter.greet_with(message)
168
+ message << ", World"
169
+
170
+ expect(greeter).to have_received(:greet_with).with("Hello")
171
+ ```
172
+
173
+ ## Nomenclature
174
+
175
+ ### Mock Objects and Test Stubs
176
+
177
+ The names Mock Object and Test Stub suggest specialized Test Doubles. i.e.
178
+ a Test Stub is a Test Double that only supports method stubs, and a Mock
179
+ Object is a Test Double that supports message expectations and method
180
+ stubs.
181
+
182
+ There is a lot of overlapping nomenclature here, and there are many
183
+ variations of these patterns (fakes, spies, etc). Keep in mind that most of
184
+ the time we're talking about method-level concepts that are variations of
185
+ method stubs and message expectations, and we're applying to them to _one_
186
+ generic kind of object: a Test Double.
187
+
188
+ ### Test-Specific Extension
189
+
190
+ a.k.a. Partial Double, a Test-Specific Extension is an extension of a
191
+ real object in a system that is instrumented with test-double like
192
+ behaviour in the context of a test. This technique is very common in Ruby
193
+ because we often see class objects acting as global namespaces for methods.
194
+ For example, in Rails:
195
+
196
+ ```ruby
197
+ person = double("person")
198
+ allow(Person).to receive(:find) { person }
199
+ ```
200
+
201
+ In this case we're instrumenting Person to return the person object we've
202
+ defined whenever it receives the `find` message. We can also set a message
203
+ expectation so that the example fails if `find` is not called:
204
+
205
+ ```ruby
206
+ person = double("person")
207
+ expect(Person).to receive(:find) { person }
208
+ ```
209
+
210
+ RSpec replaces the method we're stubbing or mocking with its own
211
+ test-double-like method. At the end of the example, RSpec verifies any message
212
+ expectations, and then restores the original methods.
213
+
214
+ ## Expecting Arguments
215
+
216
+ ```ruby
217
+ expect(double).to receive(:msg).with(*args)
218
+ expect(double).to_not receive(:msg).with(*args)
219
+ ```
220
+
221
+ You can set multiple expectations for the same message if you need to:
222
+
223
+ ```ruby
224
+ expect(double).to receive(:msg).with("A", 1, 3)
225
+ expect(double).to receive(:msg).with("B", 2, 4)
226
+ ```
227
+
228
+ ## Argument Matchers
229
+
230
+ Arguments that are passed to `with` are compared with actual arguments
231
+ received using ==. In cases in which you want to specify things about the
232
+ arguments rather than the arguments themselves, you can use any of the
233
+ matchers that ship with rspec-expectations. They don't all make syntactic
234
+ sense (they were primarily designed for use with RSpec::Expectations), but
235
+ you are free to create your own custom RSpec::Matchers.
236
+
237
+ rspec-mocks also adds some keyword Symbols that you can use to
238
+ specify certain kinds of arguments:
239
+
240
+ ```ruby
241
+ expect(double).to receive(:msg).with(no_args)
242
+ expect(double).to receive(:msg).with(any_args)
243
+ expect(double).to receive(:msg).with(1, any_args) # any args acts like an arg splat and can go anywhere
244
+ expect(double).to receive(:msg).with(1, kind_of(Numeric), "b") #2nd argument can be any kind of Numeric
245
+ expect(double).to receive(:msg).with(1, boolean(), "b") #2nd argument can be true or false
246
+ expect(double).to receive(:msg).with(1, /abc/, "b") #2nd argument can be any String matching the submitted Regexp
247
+ expect(double).to receive(:msg).with(1, anything(), "b") #2nd argument can be anything at all
248
+ expect(double).to receive(:msg).with(1, duck_type(:abs, :div), "b") #2nd argument can be object that responds to #abs and #div
249
+ expect(double).to receive(:msg).with(hash_including(:a => 5)) # first arg is a hash with a: 5 as one of the key-values
250
+ expect(double).to receive(:msg).with(array_including(5)) # first arg is an array with 5 as one of the key-values
251
+ expect(double).to receive(:msg).with(hash_excluding(:a => 5)) # first arg is a hash without a: 5 as one of the key-values
252
+ ```
253
+
254
+ ## Receive Counts
255
+
256
+ ```ruby
257
+ expect(double).to receive(:msg).once
258
+ expect(double).to receive(:msg).twice
259
+ expect(double).to receive(:msg).exactly(n).times
260
+ expect(double).to receive(:msg).at_least(:once)
261
+ expect(double).to receive(:msg).at_least(:twice)
262
+ expect(double).to receive(:msg).at_least(n).times
263
+ expect(double).to receive(:msg).at_most(:once)
264
+ expect(double).to receive(:msg).at_most(:twice)
265
+ expect(double).to receive(:msg).at_most(n).times
266
+ ```
267
+
268
+ ## Ordering
269
+
270
+ ```ruby
271
+ expect(double).to receive(:msg).ordered
272
+ expect(double).to receive(:other_msg).ordered
273
+ # This will fail if the messages are received out of order
274
+ ```
275
+
276
+ This can include the same message with different arguments:
277
+
278
+ ```ruby
279
+ expect(double).to receive(:msg).with("A", 1, 3).ordered
280
+ expect(double).to receive(:msg).with("B", 2, 4).ordered
281
+ ```
282
+
283
+ ## Setting Responses
284
+
285
+ Whether you are setting a message expectation or a method stub, you can
286
+ tell the object precisely how to respond. The most generic way is to pass
287
+ a block to `receive`:
288
+
289
+ ```ruby
290
+ expect(double).to receive(:msg) { value }
291
+ ```
292
+
293
+ When the double receives the `msg` message, it evaluates the block and returns
294
+ the result.
295
+
296
+ ```ruby
297
+ expect(double).to receive(:msg).and_return(value)
298
+ expect(double).to receive(:msg).exactly(3).times.and_return(value1, value2, value3)
299
+ # returns value1 the first time, value2 the second, etc
300
+ expect(double).to receive(:msg).and_raise(error)
301
+ # error can be an instantiated object or a class
302
+ # if it is a class, it must be instantiable with no args
303
+ expect(double).to receive(:msg).and_throw(:msg)
304
+ expect(double).to receive(:msg).and_yield(values, to, yield)
305
+ expect(double).to receive(:msg).and_yield(values, to, yield).and_yield(some, other, values, this, time)
306
+ # for methods that yield to a block multiple times
307
+ ```
308
+
309
+ Any of these responses can be applied to a stub as well
310
+
311
+ ```ruby
312
+ allow(double).to receive(:msg).and_return(value)
313
+ allow(double).to receive(:msg).and_return(value1, value2, value3)
314
+ allow(double).to receive(:msg).and_raise(error)
315
+ allow(double).to receive(:msg).and_throw(:msg)
316
+ allow(double).to receive(:msg).and_yield(values, to, yield)
317
+ allow(double).to receive(:msg).and_yield(values, to, yield).and_yield(some, other, values, this, time)
318
+ ```
319
+
320
+ ## Arbitrary Handling
321
+
322
+ Once in a while you'll find that the available expectations don't solve the
323
+ particular problem you are trying to solve. Imagine that you expect the message
324
+ to come with an Array argument that has a specific length, but you don't care
325
+ what is in it. You could do this:
326
+
327
+ ```ruby
328
+ expect(double).to receive(:msg) do |arg|
329
+ expect(arg.size).to eq 7
330
+ end
331
+ ```
332
+
333
+ If the method being stubbed itself takes a block, and you need to yield to it
334
+ in some special way, you can use this:
335
+
336
+ ```ruby
337
+ expect(double).to receive(:msg) do |&arg|
338
+ begin
339
+ arg.call
340
+ ensure
341
+ # cleanup
342
+ end
343
+ end
344
+ ```
345
+
346
+ ## Delegating to the Original Implementation
347
+
348
+ When working with a partial mock object, you may occasionally
349
+ want to set a message expecation without interfering with how
350
+ the object responds to the message. You can use `and_call_original`
351
+ to achieve this:
352
+
353
+ ```ruby
354
+ expect(Person).to receive(:find).and_call_original
355
+ Person.find # => executes the original find method and returns the result
356
+ ```
357
+
358
+ ## Combining Expectation Details
359
+
360
+ Combining the message name with specific arguments, receive counts and responses
361
+ you can get quite a bit of detail in your expectations:
362
+
363
+ ```ruby
364
+ expect(double).to receive(:<<).with("illegal value").once.and_raise(ArgumentError)
365
+ ```
366
+
367
+ While this is a good thing when you really need it, you probably don't really
368
+ need it! Take care to specify only the things that matter to the behavior of
369
+ your code.
370
+
371
+ ## Stubbing and Hiding Constants
372
+
373
+ See the [mutating constants
374
+ README](https://github.com/rspec/rspec-mocks/blob/master/features/mutating_constants/README.md)
375
+ for info on this feature.
376
+
377
+ ## Use `before(:example)`, not `before(:context)`
378
+
379
+ Stubs in `before(:context)` are not supported. The reason is that all stubs and mocks get cleared out after each example, so any stub that is set in `before(:context)` would work in the first example that happens to run in that group, but not for any others.
380
+
381
+ Instead of `before(:context)`, use `before(:example)`.
382
+
383
+ ## Settings mocks or stubs on any instance of a class
384
+
385
+ rspec-mocks provides two methods, `allow_any_instance_of` and
386
+ `expect_any_instance_of`, that will allow you to stub or mock any instance
387
+ of a class. They are used in place of `allow` or `expect`:
388
+
389
+ ```ruby
390
+ allow_any_instance_of(Widget).to receive(:name).and_return("Wibble")
391
+ expect_any_instance_of(Widget).to receive(:name).and_return("Wobble")
392
+ ```
393
+
394
+ These methods add the appropriate stub or expectation to all instances of
395
+ `Widget`.
396
+
397
+ This feature is sometimes useful when working with legacy code, though in
398
+ general we discourage its use for a number of reasons:
399
+
400
+ * The `rspec-mocks` API is designed for individual object instances, but this
401
+ feature operates on entire classes of objects. As a result there are some
402
+ semantically confusing edge cases. For example in
403
+ `expect_any_instance_of(Widget).to receive(:name).twice` it isn't clear
404
+ whether each specific instance is expected to receive `name` twice, or if two
405
+ receives total are expected. (It's the former.)
406
+ * Using this feature is often a design smell. It may be
407
+ that your test is trying to do too much or that the object under test is too
408
+ complex.
409
+ * It is the most complicated feature of `rspec-mocks`, and has historically
410
+ received the most bug reports. (None of the core team actively use it,
411
+ which doesn't help.)
412
+
413
+
414
+ ## Further Reading
415
+
416
+ There are many different viewpoints about the meaning of mocks and stubs. If
417
+ you are interested in learning more, here is some recommended reading:
418
+
419
+ * Mock Objects: http://www.mockobjects.com/
420
+ * Endo-Testing: http://www.ccs.neu.edu/research/demeter/related-work/extreme-programming/MockObjectsFinal.PDF
421
+ * Mock Roles, Not Objects: http://www.jmock.org/oopsla2004.pdf
422
+ * Test Double: http://www.martinfowler.com/bliki/TestDouble.html
423
+ * Test Double Patterns: http://xunitpatterns.com/Test%20Double%20Patterns.html
424
+ * Mocks aren't stubs: http://www.martinfowler.com/articles/mocksArentStubs.html
425
+
426
+ ## Also see
427
+
428
+ * [http://github.com/rspec/rspec](http://github.com/rspec/rspec)
429
+ * [http://github.com/rspec/rspec-core](http://github.com/rspec/rspec-core)
430
+ * [http://github.com/rspec/rspec-expectations](http://github.com/rspec/rspec-expectations)