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,42 @@
1
+ module RSpec
2
+ module Matchers
3
+ # Facilitates converting ruby objects to English phrases.
4
+ module EnglishPhrasing
5
+ # Converts a symbol into an English expression.
6
+ #
7
+ # split_words(:banana_creme_pie) #=> "banana creme pie"
8
+ #
9
+ def self.split_words(sym)
10
+ sym.to_s.gsub(/_/, ' ')
11
+ end
12
+
13
+ # @note The returned string has a leading space except
14
+ # when given an empty list.
15
+ #
16
+ # Converts an object (often a collection of objects)
17
+ # into an English list.
18
+ #
19
+ # list(['banana', 'kiwi', 'mango'])
20
+ # #=> " \"banana\", \"kiwi\", and \"mango\""
21
+ #
22
+ # Given an empty collection, returns the empty string.
23
+ #
24
+ # list([]) #=> ""
25
+ #
26
+ def self.list(obj)
27
+ return " #{RSpec::Support::ObjectFormatter.format(obj)}" if !obj || Struct === obj
28
+ items = Array(obj).map { |w| RSpec::Support::ObjectFormatter.format(w) }
29
+ case items.length
30
+ when 0
31
+ ""
32
+ when 1
33
+ " #{items[0]}"
34
+ when 2
35
+ " #{items[0]} and #{items[1]}"
36
+ else
37
+ " #{items[0...-1].join(', ')}, and #{items[-1]}"
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,73 @@
1
+ module RSpec
2
+ module Matchers
3
+ # @api private
4
+ # Handles list of expected values when there is a need to render
5
+ # multiple diffs. Also can handle one value.
6
+ class ExpectedsForMultipleDiffs
7
+ # @private
8
+ # Default diff label when there is only one matcher in diff
9
+ # output
10
+ DEFAULT_DIFF_LABEL = "Diff:".freeze
11
+
12
+ # @private
13
+ # Maximum readable matcher description length
14
+ DESCRIPTION_MAX_LENGTH = 65
15
+
16
+ def initialize(expected_list)
17
+ @expected_list = expected_list
18
+ end
19
+
20
+ # @api private
21
+ # Wraps provided expected value in instance of
22
+ # ExpectedForMultipleDiffs. If provided value is already an
23
+ # ExpectedForMultipleDiffs then it just returns it.
24
+ # @param [Any] expected value to be wrapped
25
+ # @return [RSpec::Matchers::ExpectedsForMultipleDiffs]
26
+ def self.from(expected)
27
+ return expected if self === expected
28
+ new([[expected, DEFAULT_DIFF_LABEL]])
29
+ end
30
+
31
+ # @api private
32
+ # Wraps provided matcher list in instance of
33
+ # ExpectedForMultipleDiffs.
34
+ # @param [Array<Any>] matchers list of matchers to wrap
35
+ # @return [RSpec::Matchers::ExpectedsForMultipleDiffs]
36
+ def self.for_many_matchers(matchers)
37
+ new(matchers.map { |m| [m.expected, diff_label_for(m)] })
38
+ end
39
+
40
+ # @api private
41
+ # Returns message with diff(s) appended for provided differ
42
+ # factory and actual value if there are any
43
+ # @param [String] message original failure message
44
+ # @param [Proc] differ
45
+ # @param [Any] actual value
46
+ # @return [String]
47
+ def message_with_diff(message, differ, actual)
48
+ diff = diffs(differ, actual)
49
+ message = "#{message}\n#{diff}" unless diff.empty?
50
+ message
51
+ end
52
+
53
+ private
54
+
55
+ def self.diff_label_for(matcher)
56
+ "Diff for (#{truncated(RSpec::Support::ObjectFormatter.format(matcher))}):"
57
+ end
58
+
59
+ def self.truncated(description)
60
+ return description if description.length <= DESCRIPTION_MAX_LENGTH
61
+ description[0...DESCRIPTION_MAX_LENGTH - 3] << "..."
62
+ end
63
+
64
+ def diffs(differ, actual)
65
+ @expected_list.map do |(expected, diff_label)|
66
+ diff = differ.diff(actual, expected)
67
+ next if diff.strip.empty?
68
+ "#{diff_label}#{diff}"
69
+ end.compact.join("\n")
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,42 @@
1
+ require 'rspec/expectations'
2
+
3
+ module RSpec
4
+ module Matchers
5
+ # Matchers for testing RSpec matchers. Include them with:
6
+ #
7
+ # require 'rspec/matchers/fail_matchers'
8
+ # RSpec.configure do |config|
9
+ # config.include RSpec::Matchers::FailMatchers
10
+ # end
11
+ #
12
+ module FailMatchers
13
+ # Matches if an expectation fails
14
+ #
15
+ # @example
16
+ # expect { some_expectation }.to fail
17
+ def fail(&block)
18
+ raise_error(RSpec::Expectations::ExpectationNotMetError, &block)
19
+ end
20
+
21
+ # Matches if an expectation fails with the provided message
22
+ #
23
+ # @example
24
+ # expect { some_expectation }.to fail_with("some failure message")
25
+ # expect { some_expectation }.to fail_with(/some failure message/)
26
+ def fail_with(message)
27
+ raise_error(RSpec::Expectations::ExpectationNotMetError, message)
28
+ end
29
+
30
+ # Matches if an expectation fails including the provided message
31
+ #
32
+ # @example
33
+ # expect { some_expectation }.to fail_including("portion of some failure message")
34
+ def fail_including(*snippets)
35
+ raise_error(
36
+ RSpec::Expectations::ExpectationNotMetError,
37
+ a_string_including(*snippets)
38
+ )
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ module RSpec
2
+ module Matchers
3
+ class << self
4
+ # @private
5
+ attr_accessor :last_matcher, :last_expectation_handler
6
+ end
7
+
8
+ # @api private
9
+ # Used by rspec-core to clear the state used to generate
10
+ # descriptions after an example.
11
+ def self.clear_generated_description
12
+ self.last_matcher = nil
13
+ self.last_expectation_handler = nil
14
+ end
15
+
16
+ # @api private
17
+ # Generates an an example description based on the last expectation.
18
+ # Used by rspec-core's one-liner syntax.
19
+ def self.generated_description
20
+ return nil if last_expectation_handler.nil?
21
+ "#{last_expectation_handler.verb} #{last_description}"
22
+ end
23
+
24
+ private
25
+
26
+ def self.last_description
27
+ last_matcher.respond_to?(:description) ? last_matcher.description : <<-MESSAGE
28
+ When you call a matcher in an example without a String, like this:
29
+
30
+ specify { expect(object).to matcher }
31
+
32
+ or this:
33
+
34
+ it { is_expected.to matcher }
35
+
36
+ RSpec expects the matcher to have a #description method. You should either
37
+ add a String to the example this matcher is being used in, or give it a
38
+ description method. Then you won't have to suffer this lengthy warning again.
39
+ MESSAGE
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,35 @@
1
+ module RSpec
2
+ module Matchers
3
+ # Provides the necessary plumbing to wrap a matcher with a decorator.
4
+ # @private
5
+ class MatcherDelegator
6
+ include Composable
7
+ attr_reader :base_matcher
8
+
9
+ def initialize(base_matcher)
10
+ @base_matcher = base_matcher
11
+ end
12
+
13
+ def method_missing(*args, &block)
14
+ base_matcher.__send__(*args, &block)
15
+ end
16
+
17
+ if ::RUBY_VERSION.to_f > 1.8
18
+ def respond_to_missing?(name, include_all=false)
19
+ super || base_matcher.respond_to?(name, include_all)
20
+ end
21
+ else
22
+ # :nocov:
23
+ def respond_to?(name, include_all=false)
24
+ super || base_matcher.respond_to?(name, include_all)
25
+ end
26
+ # :nocov:
27
+ end
28
+
29
+ def initialize_copy(other)
30
+ @base_matcher = @base_matcher.clone
31
+ super
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,99 @@
1
+ module RSpec
2
+ module Matchers
3
+ # rspec-expectations can work with any matcher object that implements this protocol.
4
+ #
5
+ # @note This class is not loaded at runtime by rspec-expectations. It exists
6
+ # purely to provide documentation for the matcher protocol.
7
+ class MatcherProtocol
8
+ # @!group Required Methods
9
+
10
+ # @!method matches?(actual)
11
+ # @param actual [Object] The object being matched against.
12
+ # @yield For an expression like `expect(x).to matcher do...end`, the `do/end`
13
+ # block binds to `to`. It passes that block, if there is one, on to this method.
14
+ # @return [Boolean] true if this matcher matches the provided object.
15
+
16
+ # @!method failure_message
17
+ # This will only be called if {#matches?} returns false.
18
+ # @return [String] Explanation for the failure.
19
+
20
+ # @!endgroup
21
+
22
+ # @!group Optional Methods
23
+
24
+ # @!method does_not_match?(actual)
25
+ # In a negative expectation such as `expect(x).not_to foo`, RSpec will
26
+ # call `foo.does_not_match?(x)` if this method is defined. If it's not
27
+ # defined it will fall back to using `!foo.matches?(x)`. This allows you
28
+ # to provide custom logic for the negative case.
29
+ #
30
+ # @param actual [Object] The object being matched against.
31
+ # @yield For an expression like `expect(x).not_to matcher do...end`, the `do/end`
32
+ # block binds to `not_to`. It passes that block, if there is one, on to this method.
33
+ # @return [Boolean] true if this matcher does not match the provided object.
34
+
35
+ # @!method failure_message_when_negated
36
+ # This will only be called when a negative match fails.
37
+ # @return [String] Explanation for the failure.
38
+ # @note This method is listed as optional because matchers do not have to
39
+ # support negation. But if your matcher does support negation, this is a
40
+ # required method -- otherwise, you'll get a `NoMethodError`.
41
+
42
+ # @!method description
43
+ # The description is used for two things:
44
+ #
45
+ # * When using RSpec's one-liner syntax
46
+ # (e.g. `it { is_expected.to matcher }`), the description
47
+ # is used to generate the example's doc string since you
48
+ # have not provided one.
49
+ # * In a composed matcher expression, the description is used
50
+ # as part of the failure message (and description) of the outer
51
+ # matcher.
52
+ #
53
+ # @return [String] Description of the matcher.
54
+
55
+ # @!method supports_block_expectations?
56
+ # Indicates that this matcher can be used in a block expectation expression,
57
+ # such as `expect { foo }.to raise_error`. Generally speaking, this is
58
+ # only needed for matchers which operate on a side effect of a block, rather
59
+ # than on a particular object.
60
+ # @return [Boolean] true if this matcher can be used in block expressions.
61
+ # @note If not defined, RSpec assumes a value of `false` for this method.
62
+
63
+ # @!method expects_call_stack_jump?
64
+ # Indicates that when this matcher is used in a block expectation
65
+ # expression, it expects the block to use a ruby construct that causes
66
+ # a call stack jump (such as raising an error or throwing a symbol).
67
+ #
68
+ # This is used internally for compound block expressions, as matchers
69
+ # which expect call stack jumps must be treated with care to work properly.
70
+ #
71
+ # @return [Boolean] true if the matcher expects a call stack jump
72
+ #
73
+ # @note This method is very rarely used or needed.
74
+ # @note If not defined, RSpec assumes a value of `false` for this method.
75
+
76
+ # @!method diffable?
77
+ # @return [Boolean] true if `actual` and `expected` can be diffed.
78
+ # Indicates that this matcher provides `actual` and `expected` attributes,
79
+ # and that the values returned by these can be usefully diffed, which can
80
+ # be included in the output.
81
+
82
+ # @!method actual
83
+ # @return [String, Object] If an object (rather than a string) is provided,
84
+ # RSpec will use the `pp` library to convert it to multi-line output in
85
+ # order to diff.
86
+ # The actual value for the purposes of a diff.
87
+ # @note This method is required if `diffable?` returns true.
88
+
89
+ # @!method expected
90
+ # @return [String, Object] If an object (rather than a string) is provided,
91
+ # RSpec will use the `pp` library to convert it to multi-line output in
92
+ # order to diff.
93
+ # The expected value for the purposes of a diff.
94
+ # @note This method is required if `diffable?` returns true.
95
+
96
+ # @!endgroup
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ -
3
+ README.md
4
+ License.txt
5
+ Changelog.md
@@ -0,0 +1,6 @@
1
+ --exclude features
2
+ --no-private
3
+ --markup markdown
4
+ -
5
+ Changelog.md
6
+ License.txt
@@ -0,0 +1,965 @@
1
+ ### 3.3.2 / 2015-07-15
2
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.1...v3.3.2)
3
+
4
+ Bug Fixes:
5
+
6
+ * Prevent thread deadlock errors during proxy creation (e.g. when using
7
+ `before_verifying_doubles` callbacks). (Jon Rowe, #980, #979)
8
+
9
+ ### 3.3.1 / 2015-06-19
10
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.0...v3.3.1)
11
+
12
+ Bug Fixes:
13
+
14
+ * Fix bug in `before_verifying_double` callback logic that caused it to be called
15
+ once for each class in the ancestor list when mocking or stubbing a class. Now
16
+ it is only called for the mocked or stubbed class, as you would expect. (Sam
17
+ Phippen, #974)
18
+
19
+ ### 3.3.0 / 2015-06-12
20
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.2.1...v3.3.0)
21
+
22
+ Enhancements:
23
+
24
+ * When stubbing `new` on `MyClass` or `class_double(MyClass)`, use the
25
+ method signature from `MyClass#initialize` to verify arguments.
26
+ (Myron Marston, #886)
27
+ * Use matcher descriptions when generating description of received arguments
28
+ for mock expectation failures. (Tim Wade, #891)
29
+ * Avoid loading `stringio` unnecessarily. (Myron Marston, #894)
30
+ * Verifying doubles failure messages now distinguish between class and instance
31
+ level methods. (Tim Wade, #896, #908)
32
+ * Improve mock expectation failure messages so that it combines both
33
+ number of times and the received arguments in the output. (John Ceh, #918)
34
+ * Improve how test doubles are represented in failure messages.
35
+ (Siva Gollapalli, Myron Marston, #932)
36
+ * Rename `RSpec::Mocks::Configuration#when_declaring_verifying_double` to
37
+ `RSpec::Mocks::Configuration#before_verifying_doubles` and utilise when
38
+ verifying partial doubles. (Jon Rowe, #940)
39
+ * Use rspec-support's `ObjectFormatter` for improved formatting of
40
+ arguments in failure messages so that, for example, full time
41
+ precisions is displayed for time objects. (Gavin Miller, Myron Marston, #955)
42
+
43
+ Bug Fixes:
44
+
45
+ * Ensure expectations that raise eagerly also raise during RSpec verification.
46
+ This means that if exceptions are caught inside test execution the test will
47
+ still fail. (Sam Phippen, #884)
48
+ * Fix `have_received(msg).with(args).exactly(n).times` and
49
+ `receive(msg).with(args).exactly(n).times` failure messages
50
+ for when the message was received the wrong number of times with
51
+ the specified args, and also received additional times with other
52
+ arguments. Previously it confusingly listed the arguments as being
53
+ mis-matched (even when the double was allowed to receive with any
54
+ args) rather than listing the count. (John Ceh, #918)
55
+ * Fix `any_args`/`anything` support so that we avoid calling `obj == anything`
56
+ on user objects that may have improperly implemented `==` in a way that
57
+ raises errors. (Myron Marston, #924)
58
+ * Fix edge case involving stubbing the same method on a class and a subclass
59
+ which previously hit a `NoMethodError` internally in RSpec. (Myron Marston #954)
60
+ * Fix edge case where the message received count would be incremented multiple
61
+ times for one failure. (Myron Marston, #957)
62
+ * Fix failure messages for when spies received the expected message with
63
+ different arguments and also received another message. (Maurício Linhares, #960)
64
+ * Silence whitespace-only diffs. (Myron Marston, #969)
65
+
66
+ ### 3.2.1 / 2015-02-23
67
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.2.0...v3.2.1)
68
+
69
+ Bug Fixes:
70
+
71
+ * Add missing `rspec/support/differ` require so that rspec-mocks can be
72
+ used w/o rspec-expectations (which also loads the differ and hided the
73
+ fact we forgot to require it). (Myron Marston, #893)
74
+ * Revert tracking of received arg mutation (added in 3.2.0 to provide an
75
+ error in a situation we can't support) as our implementation has side
76
+ effects on non-standard objects and there's no solution we could come
77
+ up with that always works. (Myron Marston, #900)
78
+
79
+ ### 3.2.0 / 2015-02-03
80
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.3...v3.2.0)
81
+
82
+ Enhancements:
83
+
84
+ * Treat `any_args` as an arg splat, allowing it to match an arbitrary
85
+ number of args at any point in an arg list. (Myron Marston, #786)
86
+ * Print diffs when arguments in mock expectations are mismatched.
87
+ (Sam Phippen, #751)
88
+ * Support names for verified doubles (`instance_double`, `instance_spy`,
89
+ `class_double`, `class_spy`, `object_double`, `object_spy`). (Cezary
90
+ Baginski, #826)
91
+ * Make `array_including` and `hash_including` argument matchers composable.
92
+ (Sam Phippen, #819)
93
+ * Make `allow_any_instance_of(...).to receive(...).and_wrap_original`
94
+ work. (Ryan Fitzgerald, #869)
95
+
96
+ Bug Fixes:
97
+
98
+ * Provide a clear error when users wrongly combine `no_args` with
99
+ additional arguments (e.g. `expect().to receive().with(no_args, 1)`).
100
+ (Myron Marston, #786)
101
+ * Provide a clear error when users wrongly use `any_args` multiple times in the
102
+ same argument list (e.g. `expect().to receive().with(any_args, 1, any_args)`.
103
+ (Myron Marston, #786)
104
+ * Prevent the error generator from using user object #description methods.
105
+ See [#685](https://github.com/rspec/rspec-mocks/issues/685).
106
+ (Sam Phippen, #751)
107
+ * Make verified doubles declared as `(instance|class)_double(SomeConst)`
108
+ work properly when `SomeConst` has previously been stubbed.
109
+ `(instance|class)_double("SomeClass")` already worked properly.
110
+ (Myron Marston, #824)
111
+ * Add a matcher description for `receive`, `receive_messages` and
112
+ `receive_message_chain`. (Myron Marston, #828)
113
+ * Validate invocation args for null object verified doubles.
114
+ (Myron Marston, #829)
115
+ * Fix `RSpec::Mocks::Constant.original` when called with an invalid
116
+ constant to return an object indicating the constant name is invalid,
117
+ rather than blowing up. (Myron Marston, #833)
118
+ * Make `extend RSpec::Mocks::ExampleMethods` on any object work properly
119
+ to add the rspec-mocks API to that object. Previously, `expect` would
120
+ be undefined. (Myron Marston, #846)
121
+ * Fix `require 'rspec/mocks/standalone'` so that it only affects `main`
122
+ and not every object. It's really only intended to be used in a REPL
123
+ like IRB, but some gems have loaded it, thinking it needs to be loaded
124
+ when using rspec-mocks outside the context of rspec-core.
125
+ (Myron Marston, #846)
126
+ * Prevent message expectations from being modified by customization methods
127
+ (e.g. `with`) after they have been invoked. (Sam Phippen and Melanie Gilman, #837)
128
+ * Handle cases where a method stub cannot be removed due to something
129
+ external to RSpec monkeying with the method definition. This can
130
+ happen, for example, when you `file.reopen(io)` after previously
131
+ stubbing a method on the `file` object. (Myron Marston, #853)
132
+ * Provide a clear error when received message args are mutated before
133
+ a `have_received(...).with(...)` expectation. (Myron Marston, #868)
134
+
135
+ ### 3.1.3 / 2014-10-08
136
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.2...v3.1.3)
137
+
138
+ Bug Fixes:
139
+
140
+ * Correct received messages count when used with `have_received` matcher.
141
+ (Jon Rowe, #793)
142
+ * Provide a clear error message when you use `allow_any_instance_of(...)` or
143
+ `expect_any_instance_of(...)` with the `have_received` matcher (they are
144
+ not intended to be used together and previously caused an odd internal
145
+ failure in rspec-mocks). (Jon Rowe, #799).
146
+ * Fix verified double `with` verification so that it applies to method
147
+ stubs. (Myron Marston, #790)
148
+
149
+ ### 3.1.2 / 2014-09-26
150
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.1...v3.1.2)
151
+
152
+ Bug Fixes:
153
+
154
+ * Provide a clear error message when you use `allow(...)` with the
155
+ `have_received` matcher (they are not intended to be used together
156
+ and previously caused an odd internal failure in rspec-mocks). (Jon Rowe, #788).
157
+
158
+ ### 3.1.1 / 2014-09-18
159
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.0...v3.1.1)
160
+
161
+ Bug Fixes:
162
+
163
+ * Prevent included modules being detected as prepended modules on Ruby 2.0
164
+ when using `any_instance_of(...)`. (Tony Novak, #781)
165
+
166
+ ### 3.1.0 / 2014-09-04
167
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.4...v3.1.0)
168
+
169
+ Enhancements:
170
+
171
+ * Add spying methods (`spy`, `ìnstance_spy`, `class_spy` and `object_spy`)
172
+ which create doubles as null objects for use with spying in testing. (Sam
173
+ Phippen, #671)
174
+ * `have_received` matcher will raise "does not implement" errors correctly when
175
+ used with verifying doubles and partial doubles. (Xavier Shay, #722)
176
+ * Allow matchers to be used in place of keyword arguments in `with`
177
+ expectations. (Xavier Shay, #726)
178
+ * Add `thrice` modifier to message expectation interface as a synonym
179
+ for `exactly(3).times`. (Dennis Taylor, #753)
180
+ * Add more `thrice` synonyms e.g. `.at_least(:thrice)`, `.at_most(:thrice)`,
181
+ `receive(...).thrice` and `have_received(...).thrice`. (Jon Rowe, #754)
182
+ * Add `and_wrap_original` modifier for partial doubles to mutate the
183
+ response from a method. (Jon Rowe, #762)
184
+
185
+ Bug Fixes:
186
+
187
+ * Remove `any_number_of_times` from `any_instance` recorders that were
188
+ erroneously causing mention of the method in documentation. (Jon Rowe, #760)
189
+ * Prevent included modules being detected as prepended modules on Ruby 2.0.
190
+ (Eugene Kenny, #771)
191
+
192
+ ### 3.0.4 / 2014-08-14
193
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.3...v3.0.4)
194
+
195
+ Bug Fixes:
196
+
197
+ * Restore `kind_of(x)` to match using `arg.kind_of?(x)` (like RSpec 2)
198
+ rather than `x === arg`. (Jon Rowe, #750)
199
+
200
+ ### 3.0.3 / 2014-07-21
201
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.2...v3.0.3)
202
+
203
+ Bug Fixes:
204
+
205
+ * `have_received` matcher will raise "does not implement" errors correctly when
206
+ used with verifying doubles and partial doubles. (Xavier Shay, #722)
207
+ * Make `double.as_null_object.dup` and `double.as_null_object.clone`
208
+ make the copies be null objects. (Myron Marston, #732)
209
+ * Don't inadvertently define `BasicObject` in 1.8.7. (Chris Griego, #739)
210
+
211
+ ### 3.0.2 / 2014-06-19
212
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.1...v3.0.2)
213
+
214
+ Bug Fixes:
215
+
216
+ * Fix edge case that triggered "can't add a new key into hash during
217
+ iteration" during mock verification. (Sam Phippen, Myron Marston, #711)
218
+ * Fix verifying doubles so that when they accidentally leak into another
219
+ example, they provide the same clear error message that normal doubles
220
+ do. (Myron Marston, #718)
221
+ * Make `ordered` work with exact receive counts. (Sam Phippen, #713)
222
+
223
+ ### 3.0.1 / 2014-06-07
224
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0...v3.0.1)
225
+
226
+ Bug Fixes:
227
+
228
+ * Fix `receive_message_chain(...)` so that it supports `with` just like
229
+ `stub_chain` did. (Jon Rowe, #697)
230
+ * Fix regression in `expect_any_instance_of` so that it expects the
231
+ message on _any_ instance rather than on _every_ instance.
232
+ (Myron Marston, #699)
233
+
234
+ ### 3.0.0 / 2014-06-01
235
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0.rc1...v3.0.0)
236
+
237
+ Bug Fixes:
238
+
239
+ * Fix module prepend detection to work properly on ruby 2.0 for a case
240
+ where a module is extended onto itself. (Myron Marston)
241
+ * Fix `transfer_nested_constants` option so that transferred constants
242
+ get properly reset at the end of the example. (Myron Marston)
243
+ * Fix `config.transfer_nested_constants = true` so that you don't
244
+ erroneously get errors when stubbing a constant that is not a module
245
+ or a class. (Myron Marston)
246
+ * Fix regression that caused `double(:class => SomeClass)` to later
247
+ trigger infinite recursion. (Myron Marston)
248
+ * Fix bug in `have_received(...).with(...).ordered` where it was not
249
+ taking the args into account when checking the order. (Myron Marston)
250
+ * Fix bug in `have_received(...).ordered` where it was wrongly
251
+ considering stubs when checking the order. (Myron Marston)
252
+ * Message expectation matchers now show descriptions from argument
253
+ matchers when their expectations aren't met. (Jon Rowe)
254
+ * Display warning when encountering `TypeError` during instance method
255
+ staging on 2.0.0-p195, suffers from https://bugs.ruby-lang.org/issues/8686
256
+ too. (Cezar Halmagean).
257
+
258
+ ### 3.0.0.rc1 / 2014-05-18
259
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0.beta2...v3.0.0.rc1)
260
+
261
+ Breaking Changes for 3.0.0:
262
+
263
+ * Remove `RSpec::Mocks::TestDouble.extend_onto`. (Myron Marston)
264
+ * Remove `RSpec::Mocks::ConstantStubber`. (Jon Rowe)
265
+ * Make monkey-patch of Marshal to support dumping of stubbed objects opt-in.
266
+ (Xavier Shay)
267
+
268
+ Enhancements:
269
+
270
+ * Instead of crashing when cleaning up stub methods on a frozen object, it now
271
+ issues a warning explaining that it's impossible to clean up the stubs.
272
+ (Justin Coyne and Sam Phippen)
273
+ * Add meaningful descriptions to `anything`, `duck_type` and `instance_of` argument
274
+ matchers. (Jon Rowe)
275
+
276
+ Bug Fixes:
277
+
278
+ * Fix regression introduced in 3.0.0.beta2 that caused
279
+ `double.as_null_object.to_str` to return the double rather
280
+ than a string. (Myron Marston)
281
+ * Fix bug in `expect(dbl).to receive_message_chain(:foo, :bar)` where it was
282
+ not setting an expectation for the last message in the chain.
283
+ (Jonathan del Strother)
284
+ * Allow verifying partial doubles to have private methods stubbed. (Xavier Shay)
285
+ * Fix bug with allowing/expecting messages on Class objects which have had
286
+ their singleton class prepended to. (Jon Rowe)
287
+ * Fix an issue with 1.8.7 not running implementation blocks on partial doubles.
288
+ (Maurício Linhares)
289
+ * Prevent `StackLevelTooDeep` errors when stubbing an `any_instance` method that's
290
+ accessed in `inspect` by providing our own inspect output. (Jon Rowe)
291
+ * Fix bug in `any_instance` logic that did not allow you to mock or stub
292
+ private methods if `verify_partial_doubles` was configured. (Oren Dobzinski)
293
+ * Include useful error message when trying to observe an unimplemented method
294
+ on an any instance. (Xavier Shay)
295
+ * Fix `and_call_original` to work properly when multiple classes in an
296
+ inheritance hierarchy have been stubbed with the same method. (Myron Marston)
297
+ * Fix `any_instance` so that it updates existing instances that have
298
+ already been stubbed. (Myron Marston)
299
+ * Fix verified doubles so that their class name is included in failure
300
+ messages. (Myron Marston)
301
+ * Fix `expect_any_instance_of` so that when the message is received
302
+ on an individual instance that has been directly stubbed, it still
303
+ satisfies the expectation. (Sam Phippen, Myron Marston)
304
+ * Explicitly disallow using `any_instance` to mock or stub a method
305
+ that is defined on a module prepended onto the class. This triggered
306
+ `SystemStackError` before and is very hard to support so we are not
307
+ supporting it at this time. (Myron Marston)
308
+
309
+ ### 3.0.0.beta2 / 2014-02-17
310
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0.beta1...v3.0.0.beta2)
311
+
312
+ Breaking Changes for 3.0.0:
313
+
314
+ * Rename `RSpec::Mocks::Mock` to `RSpec::Mocks::Double`. (Myron Marston)
315
+ * Change how to integrate rspec-mocks in other test frameworks. You now
316
+ need to include `RSpec::Mocks::ExampleMethods` in your test context.
317
+ (Myron Marston)
318
+ * Prevent RSpec mocks' doubles and partial doubles from being used outside of
319
+ the per-test lifecycle (e.g. from a `before(:all)` hook). (Sam Phippen)
320
+ * Remove the `host` argument of `RSpec::Mocks.setup`. Instead
321
+ `RSpec::Mocks::ExampleMethods` should be included directly in the scope where
322
+ RSpec's mocking capabilities are used. (Sam Phippen)
323
+ * Make test doubles raise errors if you attempt to use them after they
324
+ get reset, to help surface issues when you accidentally retain
325
+ references to test doubles and attempt to reuse them in another
326
+ example. (Myron Marston)
327
+ * Remove support for `and_return { value }` and `and_return` without arguments. (Yuji Nakayama)
328
+
329
+ Enhancements:
330
+
331
+ * Add `receive_message_chain` which provides the functionality of the old
332
+ `stub_chain` for the new allow/expect syntax. Use it like so: `allow(...).to
333
+ receive_message_chain(:foo, :bar, :bazz)`. (Sam Phippen).
334
+ * Change argument matchers to use `===` as their primary matching
335
+ protocol, since their semantics mirror that of a case or rescue statement
336
+ (which uses `===` for matching). (Myron Marston)
337
+ * Add `RSpec::Mocks.with_temporary_scope`, which allows you to create
338
+ temporary rspec-mocks scopes in arbitrary places (such as a
339
+ `before(:all)` hook). (Myron Marston)
340
+ * Support keyword arguments when checking arity with verifying doubles.
341
+ (Xavier Shay)
342
+
343
+ Bug Fixes:
344
+
345
+ * Fix regression in 3.0.0.beta1 that caused `double("string_name" => :value)`
346
+ to stop working. (Xavier Shay)
347
+ * Fix the way rspec-mocks and rspec-core interact so that if users
348
+ define a `let` with the same name as one of the methods
349
+ from `RSpec::Mocks::ArgumentMatchers`, the user's `let` takes
350
+ precedence. (Michi Huber, Myron Marston)
351
+ * Fix verified doubles so that their methods match the visibility
352
+ (public, protected or private) of the interface they verify
353
+ against. (Myron Marston)
354
+ * Fix verified null object doubles so that they do not wrongly
355
+ report that they respond to anything. They only respond to methods
356
+ available on the interface they verify against. (Myron Marston)
357
+ * Fix deprecation warning for use of old `:should` syntax w/o explicit
358
+ config so that it no longer is silenced by an extension gem such
359
+ as rspec-rails when it calls `config.add_stub_and_should_receive_to`.
360
+ (Sam Phippen)
361
+ * Fix `expect` syntax so that it does not wrongly emit a "You're
362
+ overriding a previous implementation for this stub" warning when
363
+ you are not actually doing that. (Myron Marston)
364
+ * Fix `any_instance.unstub` when used on sub classes for whom the super
365
+ class has had `any_instance.stub` invoked on. (Jon Rowe)
366
+ * Fix regression in `stub_chain`/`receive_message_chain` that caused
367
+ it to raise an `ArgumentError` when passing args to the stubbed
368
+ methods. (Sam Phippen)
369
+ * Correct stub of undefined parent modules all the way down when stubbing a
370
+ nested constant. (Xavier Shay)
371
+ * Raise `VerifyingDoubleNotDefinedError` when a constant is not defined for
372
+ a verifying class double. (Maurício Linhares)
373
+ * Remove `Double#to_str`, which caused confusing `raise some_double`
374
+ behavior. (Maurício Linhares)
375
+
376
+ ### 3.0.0.beta1 / 2013-11-07
377
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.4...v3.0.0.beta1)
378
+
379
+ Breaking Changes for 3.0.0:
380
+
381
+ * Raise an explicit error if `should_not_receive(...).and_return` is used. (Sam
382
+ Phippen)
383
+ * Remove 1.8.6 workarounds. (Jon Rowe)
384
+ * Remove `stub!` and `unstub!`. (Sam Phippen)
385
+ * Remove `mock(name, methods)` and `stub(name, methods)`, leaving
386
+ `double(name, methods)` for creating test doubles. (Sam Phippen, Michi Huber)
387
+ * Remove `any_number_of_times` since `should_receive(:msg).any_number_of_times`
388
+ is really a stub in a mock's clothing. (Sam Phippen)
389
+ * Remove support for re-using the same null-object test double in multiple
390
+ examples. Test doubles are designed to only live for one example.
391
+ (Myron Marston)
392
+ * Make `at_least(0)` raise an error. (Sam Phippen)
393
+ * Remove support for `require 'spec/mocks'` which had been kept
394
+ in place for backwards compatibility with RSpec 1. (Myron Marston)
395
+ * Blocks provided to `with` are always used as implementation. (Xavier Shay)
396
+ * The config option (added in 2.99) to yield the receiver to
397
+ `any_instance` implementation blocks now defaults to "on". (Sam Phippen)
398
+
399
+ Enhancements:
400
+
401
+ * Allow the `have_received` matcher to use a block to set further expectations
402
+ on arguments. (Tim Cowlishaw)
403
+ * Provide `instance_double` and `class_double` to create verifying doubles,
404
+ ported from `rspec-fire`. (Xavier Shay)
405
+ * `as_null_object` on a verifying double only responds to defined methods.
406
+ (Xavier Shay)
407
+ * Provide `object_double` to create verified doubles of specific object
408
+ instances. (Xavier Shay)
409
+ * Provide `verify_partial_doubles` configuration that provides `object_double`
410
+ like verification behaviour on partial doubles. (Xavier Shay)
411
+ * Improved performance of double creation, particularly those with many
412
+ attributes. (Xavier Shay)
413
+ * Default value of `transfer_nested_constants` option for constant stubbing can
414
+ be configured. (Xavier Shay)
415
+ * Messages can be allowed or expected on in bulk via
416
+ `receive_messages(:message => :value)`. (Jon Rowe)
417
+ * `allow(Klass.any_instance)` and `expect(Klass.any_instance)` now print a
418
+ warning. This is usually a mistake, and users usually want
419
+ `allow_any_instance_of` or `expect_any_instance_of` instead. (Sam Phippen)
420
+ * `instance_double` and `class_double` raise `ArgumentError` if the underlying
421
+ module is loaded and the arity of the method being invoked does not match the
422
+ arity of the method as it is actually implemented. (Andy Lindeman)
423
+ * Spies can now check their invocation ordering is correct. (Jon Rowe)
424
+
425
+ Deprecations:
426
+
427
+ * Using the old `:should` syntax without explicitly configuring it
428
+ is deprecated. It will continue to work but will emit a deprecation
429
+ warning in RSpec 3 if you do not explicitly enable it. (Sam Phippen)
430
+
431
+ Bug Fixes:
432
+
433
+ * Fix `and_call_original` to handle a complex edge case involving
434
+ singleton class ancestors. (Marc-André Lafortune, Myron Marston)
435
+ * When generating an error message for unexpected arguments,
436
+ use `#inspect` rather than `#description` if `#description`
437
+ returns `nil` or `''` so that you still get a useful message.
438
+ (Nick DeLuca)
439
+
440
+ ### 2.99.4 / 2015-06-19
441
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.3...v2.99.4)
442
+
443
+ Bug Fixes:
444
+
445
+ * Add missing deprecation for using `with` with no arguments e.g. `with()`. (Yousuke, #970)
446
+
447
+ ### 2.99.3 / 2015-01-09
448
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.2...v2.99.3)
449
+
450
+ Bug Fixes:
451
+
452
+ * Fix regression that caused an error when a test double was deserialized from YAML. (Yuji Nakayama, #777)
453
+
454
+ ### 2.99.2 / 2014-07-21
455
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.1...v2.99.2)
456
+
457
+ Enhancements:
458
+
459
+ * Warn about upcoming change to `#===` matching and `DateTime#===` behaviour.
460
+ (Jon Rowe, #735)
461
+
462
+ ### 2.99.1 / 2014-06-12
463
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0...v2.99.1)
464
+
465
+ Bug Fixes:
466
+
467
+ * Fix bug that caused errors at the end of each example
468
+ when a `double.as_null_object` had been frozen. (Yuji Nakayama, #698)
469
+
470
+ Deprecations:
471
+
472
+ * Deprecate freezing a test double. (Yuji Nakayama, #698)
473
+
474
+ ### 2.99.0 / 2014-06-01
475
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0.rc1...v2.99.0)
476
+
477
+ No changes. Just taking it out of pre-release.
478
+
479
+ ### 2.99.0.rc1 / 2014-05-18
480
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0.beta2...v2.99.0.rc1)
481
+
482
+ Deprecations:
483
+
484
+ * Deprecate `RSpec::Mocks::TestDouble.extend_onto`. (Myron Marston)
485
+ * Deprecate `RSpec::Mocks::ConstantStubber`. (Jon Rowe)
486
+ * Deprecate `Marshal.dump` monkey-patch without opt-in. (Xavier Shay)
487
+
488
+ ### 2.99.0.beta2 / 2014-02-17
489
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0.beta1...v2.99.0.beta2)
490
+
491
+ Deprecations:
492
+
493
+ * Deprecate `RSpec::Mocks::Mock` in favor of `RSpec::Mocks::Double`.
494
+ (Myron Marston)
495
+ * Deprecate the `host` argument of `RSpec::Mocks.setup`. Instead
496
+ `RSpec::Mocks::ExampleMethods` should be included directly in the scope where
497
+ RSpec's mocking capabilities are used. (Sam Phippen)
498
+ * Deprecate using any of rspec-mocks' features outside the per-test
499
+ lifecycle (e.g. from a `before(:all)` hook). (Myron Marston)
500
+ * Deprecate re-using a test double in another example. (Myron Marston)
501
+ * Deprecate `and_return { value }` and `and_return` without arguments. (Yuji Nakayama)
502
+
503
+ ### 2.99.0.beta1 / 2013-11-07
504
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.4...v2.99.0.beta1)
505
+
506
+ Deprecations
507
+
508
+ * Expecting to use lambdas or other strong arity implementations for stub
509
+ methods with mis-matched arity is deprecated and support for them will be
510
+ removed in 3.0. Either provide the right amount of arguments or use a weak
511
+ arity implementation (methods with splats or procs). (Jon Rowe)
512
+ * Using the same test double instance in multiple examples is deprecated. Test
513
+ doubles are only meant to live for one example. The mocks and stubs have
514
+ always been reset between examples; however, in 2.x the `as_null_object`
515
+ state was not reset and some users relied on this to have a null object
516
+ double that is used for many examples. This behavior will be removed in 3.0.
517
+ (Myron Marston)
518
+ * Print a detailed warning when an `any_instance` implementation block is used
519
+ when the new `yield_receiver_to_any_instance_implementation_blocks` config
520
+ option is not explicitly set, as RSpec 3.0 will default to enabling this new
521
+ feature. (Sam Phippen)
522
+
523
+ Enhancements:
524
+
525
+ * Add a config option to yield the receiver to `any_instance` implementation
526
+ blocks. (Sam Phippen)
527
+
528
+ ### 2.14.6 / 2014-02-20
529
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.5...v2.14.6)
530
+
531
+ Bug Fixes:
532
+
533
+ * Ensure `any_instance` method stubs and expectations are torn down regardless of
534
+ expectation failures. (Sam Phippen)
535
+
536
+ ### 2.14.5 / 2014-02-01
537
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.4...v2.14.5)
538
+
539
+ Bug Fixes:
540
+
541
+ * Fix regression that caused block implementations to not receive all
542
+ args on 1.8.7 if the block also receives a block, due to Proc#arity
543
+ reporting `1` no matter how many args the block receives if it
544
+ receives a block, too. (Myron Marston)
545
+
546
+ ### 2.14.4 / 2013-10-15
547
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.3...v2.14.4)
548
+
549
+ Bug Fixes:
550
+
551
+ * Fix issue where unstubing methods on "any instances" would not
552
+ remove stubs on existing instances (Jon Rowe)
553
+ * Fix issue with receive(:message) do ... end precedence preventing
554
+ the usage of modifications (`and_return` etc) (Jon Rowe)
555
+
556
+ ### 2.14.3 / 2013-08-08
557
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.2...v2.14.3)
558
+
559
+ Bug Fixes:
560
+
561
+ * Fix stubbing some instance methods for classes whose hierarchy includes
562
+ a prepended Module (Bradley Schaefer)
563
+
564
+ ### 2.14.2 / 2013-07-30
565
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.1...v2.14.2)
566
+
567
+ Bug Fixes:
568
+
569
+ * Fix `as_null_object` doubles so that they return `nil` from `to_ary`
570
+ (Jon Rowe).
571
+ * Fix regression in 2.14 that made `stub!` (with an implicit receiver)
572
+ return a test double rather than stub a method (Myron Marston).
573
+
574
+ ### 2.14.1 / 2013-07-07
575
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.0...v2.14.1)
576
+
577
+ Bug Fixes:
578
+
579
+ * Restore `double.as_null_object` behavior from 2.13 and earlier: a
580
+ double's nullness persisted between examples in earlier examples.
581
+ While this is not an intended use case (test doubles are meant to live
582
+ for only one example), we don't want to break behavior users rely
583
+ on in a minor relase. This will be deprecated in 2.99 and removed
584
+ in 3.0. (Myron Marston)
585
+
586
+ ### 2.14.0 / 2013-07-06
587
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.0.rc1...v2.14.0)
588
+
589
+ Enhancements:
590
+
591
+ * Document test spies in the readme. (Adarsh Pandit)
592
+ * Add an `array_including` matcher. (Sam Phippen)
593
+ * Add a syntax-agnostic API for mocking or stubbing a method. This is
594
+ intended for use by libraries such as rspec-rails that need to mock
595
+ or stub a method, and work regardless of the syntax the user has
596
+ configured (Paul Annesley, Myron Marston and Sam Phippen).
597
+
598
+ Bug Fixes:
599
+
600
+ * Fix `double` so that it sets up passed stubs correctly regardless of
601
+ the configured syntax (Paul Annesley).
602
+ * Allow a block implementation to be used in combination with
603
+ `and_yield`, `and_raise`, `and_return` or `and_throw`. This got fixed
604
+ in 2.13.1 but failed to get merged into master for the 2.14.0.rc1
605
+ release (Myron Marston).
606
+ * `Marshal.dump` does not unnecessarily duplicate objects when rspec-mocks has
607
+ not been fully initialized. This could cause errors when using `spork` or
608
+ similar preloading gems (Andy Lindeman).
609
+
610
+ ### 2.14.0.rc1 / 2013-05-27
611
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.13.0...v2.14.0.rc1)
612
+
613
+ Enhancements:
614
+
615
+ * Refactor internals so that the mock proxy methods and state are held
616
+ outside of the mocked object rather than inside it. This paves the way
617
+ for future syntax enhancements and removes the need for some hacky
618
+ work arounds for `any_instance` dup'ing and `YAML` serialization,
619
+ among other things. Note that the code now relies upon `__id__`
620
+ returning a unique, consistent value for any object you want to
621
+ mock or stub (Myron Marston).
622
+ * Add support for test spies. This allows you to verify a message
623
+ was received afterwards using the `have_received` matcher.
624
+ Note that you must first stub the method or use a null double.
625
+ (Joe Ferris and Joël Quenneville)
626
+ * Make `at_least` and `at_most` style receive expectations print that they were
627
+ expecting at least or at most some number of calls, rather than just the
628
+ number of calls given in the expectation (Sam Phippen)
629
+ * Make `with` style receive expectations print the args they were expecting, and
630
+ the args that they got (Sam Phippen)
631
+ * Fix some warnings seen under ruby 2.0.0p0 (Sam Phippen).
632
+ * Add a new `:expect` syntax for message expectations
633
+ (Myron Marston and Sam Phippen).
634
+
635
+ Bug fixes
636
+
637
+ * Fix `any_instance` so that a frozen object can be `dup`'d when methods
638
+ have been stubbed on that type using `any_instance` (Jon Rowe).
639
+ * Fix `and_call_original` so that it properly raises an `ArgumentError`
640
+ when the wrong number of args are passed (Jon Rowe).
641
+ * Fix `double` on 1.9.2 so you can wrap them in an Array
642
+ using `Array(my_double)` (Jon Rowe).
643
+ * Fix `stub_const` and `hide_const` to handle constants that redefine `send`
644
+ (Sam Phippen).
645
+ * Fix `Marshal.dump` extension so that it correctly handles nil.
646
+ (Luke Imhoff, Jon Rowe)
647
+ * Fix isolation of `allow_message_expectations_on_nil` (Jon Rowe)
648
+ * Use inspect to format actual arguments on expectations in failure messages (#280, Ben Langfeld)
649
+ * Protect against improperly initialised test doubles (#293) (Joseph Shraibman and Jon Rowe)
650
+
651
+ Deprecations
652
+
653
+ * Deprecate `stub` and `mock` as aliases for `double`. `double` is the
654
+ best term for creating a test double, and it reduces confusion to
655
+ have only one term (Michi Huber).
656
+ * Deprecate `stub!` and `unstub!` in favor of `stub` and `unstub`
657
+ (Jon Rowe).
658
+ * Deprecate `at_least(0).times` and `any_number_of_times` (Michi Huber).
659
+
660
+ ### 2.13.1 / 2013-04-06
661
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.13.0...v2.13.1)
662
+
663
+ Bug fixes
664
+
665
+ * Allow a block implementation to be used in combination with
666
+ `and_yield`, `and_raise`, `and_return` or `and_throw` (Myron Marston).
667
+
668
+ ### 2.13.0 / 2013-02-23
669
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.12.2...v2.13.0)
670
+
671
+ Bug fixes
672
+
673
+ * Fix bug that caused weird behavior when a method that had
674
+ previously been stubbed with multiple return values (e.g.
675
+ `obj.stub(:foo).and_return(1, 2)`) was later mocked with a
676
+ single return value (e.g. `obj.should_receive(:foo).once.and_return(1)`).
677
+ (Myron Marston)
678
+ * Fix bug related to a mock expectation for a method that already had
679
+ multiple stubs with different `with` constraints. Previously, the
680
+ first stub was used, even though it may not have matched the passed
681
+ args. The fix defers this decision until the message is received so
682
+ that the proper stub response can be chosen based on the passed
683
+ arguments (Myron Marston).
684
+ * Do not call `nil?` extra times on a mocked object, in case `nil?`
685
+ itself is expected a set number of times (Myron Marston).
686
+ * Fix `missing_default_stub_error` message so array args are handled
687
+ properly (Myron Marston).
688
+ * Explicitly disallow `any_instance.unstub!` (Ryan Jones).
689
+ * Fix `any_instance` stubbing so that it works with `Delegator`
690
+ subclasses (Myron Marston).
691
+ * Fix `and_call_original` so that it works with `Delegator` subclasses
692
+ (Myron Marston).
693
+ * Fix `any_instance.should_not_receive` when `any_instance.should_receive`
694
+ is used on the same class in the same example. Previously it would
695
+ wrongly report a failure even when the message was not received
696
+ (Myron Marston).
697
+
698
+ ### 2.12.2 / 2013-01-27
699
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.12.1...v.2.12.2)
700
+
701
+ Bug fixes
702
+
703
+ * Fix `and_call_original` to work properly for methods defined
704
+ on a module extended onto an object instance (Myron Marston).
705
+ * Fix `stub_const` with an undefined constnat name to work properly
706
+ with constant strings that are prefixed with `::` -- and edge case
707
+ I missed in the bug fix in the 2.12.1 release (Myron Marston).
708
+ * Ensure method visibility on a partial mock is restored after reseting
709
+ method stubs, even on a singleton module (created via `extend self`)
710
+ when the method visibility differs between the instance and singleton
711
+ versions (Andy Lindeman).
712
+
713
+ ### 2.12.1 / 2012-12-21
714
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.12.0...v2.12.1)
715
+
716
+ Bug fixes
717
+
718
+ * Fix `any_instance` to support `and_call_original`.
719
+ (Myron Marston)
720
+ * Properly restore stubbed aliased methods on rubies
721
+ that report the incorrect owner (Myron Marston and Andy Lindeman).
722
+ * Fix `hide_const` and `stub_const` with a defined constnat name to
723
+ work properly with constant strings that are prefixed with `::` (Myron Marston).
724
+
725
+ ### 2.12.0 / 2012-11-12
726
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.11.3...v2.12.0)
727
+
728
+ Enhancements
729
+
730
+ * `and_raise` can accept an exception class and message, more closely
731
+ matching `Kernel#raise` (e.g., `foo.stub(:bar).and_raise(RuntimeError, "message")`)
732
+ (Bas Vodde)
733
+ * Add `and_call_original`, which will delegate the message to the
734
+ original method (Myron Marston).
735
+
736
+ Deprecations:
737
+
738
+ * Add deprecation warning when using `and_return` with `should_not_receive`
739
+ (Neha Kumari)
740
+
741
+ ### 2.11.3 / 2012-09-19
742
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.11.2...v2.11.3)
743
+
744
+ Bug fixes
745
+
746
+ * Fix `:transfer_nested_constants` option of `stub_const` so that it
747
+ doesn't blow up when there are inherited constants. (Myron Marston)
748
+ * `any_instance` stubs can be used on classes that override `Object#method`.
749
+ (Andy Lindeman)
750
+ * Methods stubbed with `any_instance` are unstubbed after the test finishes.
751
+ (Andy Lindeman)
752
+ * Fix confusing error message when calling a mocked class method an
753
+ extra time with the wrong arguments (Myron Marston).
754
+
755
+ ### 2.11.2 / 2012-08-11
756
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.11.1...v2.11.2)
757
+
758
+ Bug fixes
759
+
760
+ * Don't modify `dup` on classes that don't support `dup` (David Chelimsky)
761
+ * Fix `any_instance` so that it works properly with methods defined on
762
+ a superclass. (Daniel Eguzkiza)
763
+ * Fix `stub_const` so that it works properly for nested constants that
764
+ share a name with a top-level constant (e.g. "MyGem::Hash"). (Myron
765
+ Marston)
766
+
767
+ ### 2.11.1 / 2012-07-09
768
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.11.0...v2.11.1)
769
+
770
+ Bug fixes
771
+
772
+ * Fix `should_receive` so that when it is called on an `as_null_object`
773
+ double with no implementation, and there is a previous explicit stub
774
+ for the same method, the explicit stub remains (rather than being
775
+ overriden with the null object implementation--`return self`). (Myron Marston)
776
+
777
+ ### 2.11.0 / 2012-07-07
778
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.10.1...v2.11.0)
779
+
780
+ Enhancements
781
+
782
+ * Expose ArgumentListMatcher as a formal API
783
+ * supports use by 3rd party mock frameworks like Surrogate
784
+ * Add `stub_const` API to stub constants for the duration of an
785
+ example (Myron Marston).
786
+
787
+ Bug fixes
788
+
789
+ * Fix regression of edge case behavior. `double.should_receive(:foo) { a }`
790
+ was causing a NoMethodError when `double.stub(:foo).and_return(a, b)`
791
+ had been setup before (Myron Marston).
792
+ * Infinite loop generated by using `any_instance` and `dup`. (Sidu Ponnappa @kaiwren)
793
+ * `double.should_receive(:foo).at_least(:once).and_return(a)` always returns a
794
+ even if `:foo` is already stubbed.
795
+ * Prevent infinite loop when interpolating a null double into a string
796
+ as an integer (`"%i" % double.as_null_object`). (Myron Marston)
797
+ * Fix `should_receive` so that null object behavior (e.g. returning
798
+ self) is preserved if no implementation is given (Myron Marston).
799
+ * Fix `and_raise` so that it raises `RuntimeError` rather than
800
+ `Exception` by default, just like ruby does. (Andrew Marshall)
801
+
802
+ ### 2.10.1 / 2012-05-05
803
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.10.0...v2.10.1)
804
+
805
+ Bug fixes
806
+
807
+ * fix regression of edge case behavior
808
+ (https://github.com/rspec/rspec-mocks/issues/132)
809
+ * fixed failure of `object.should_receive(:message).at_least(0).times.and_return value`
810
+ * fixed failure of `object.should_not_receive(:message).and_return value`
811
+
812
+ ### 2.10.0 / 2012-05-03
813
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.9.0...v2.10.0)
814
+
815
+ Bug fixes
816
+
817
+ * fail fast when an `exactly` or `at_most` expectation is exceeded
818
+
819
+ ### 2.9.0 / 2012-03-17
820
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.8.0...v2.9.0)
821
+
822
+ Enhancements
823
+
824
+ * Support order constraints across objects (preethiramdev)
825
+
826
+ Bug fixes
827
+
828
+ * Allow a `as_null_object` to be passed to `with`
829
+ * Pass proc to block passed to stub (Aubrey Rhodes)
830
+ * Initialize child message expectation args to match any args (#109 -
831
+ preethiramdev)
832
+
833
+ ### 2.8.0 / 2012-01-04
834
+
835
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.8.0.rc2...v2.8.0)
836
+
837
+ No changes for this release. Just releasing with the other rspec gems.
838
+
839
+ ### 2.8.0.rc2 / 2011-12-19
840
+
841
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.8.0.rc1...v2.8.0.rc2)
842
+
843
+ No changes for this release. Just releasing with the other rspec gems.
844
+
845
+ ### 2.8.0.rc1 / 2011-11-06
846
+
847
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.7.0...v2.8.0.rc1)
848
+
849
+ Enhancements
850
+
851
+ * Eliminate Ruby warnings (Matijs van Zuijlen)
852
+
853
+ ### 2.7.0 / 2011-10-16
854
+
855
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.6.0...v2.7.0)
856
+
857
+ Enhancements
858
+
859
+ * Use `__send__` rather than `send` (alextk)
860
+ * Add support for `any_instance.stub_chain` (Sidu Ponnappa)
861
+ * Add support for `any_instance` argument matching based on `with` (Sidu
862
+ Ponnappa and Andy Lindeman)
863
+
864
+ Changes
865
+
866
+ * Check for `failure_message_for_should` or `failure_message` instead of
867
+ `description` to detect a matcher (Tibor Claassen)
868
+
869
+ Bug fixes
870
+
871
+ * pass a hash to `any_instance.stub`. (Justin Ko)
872
+ * allow `to_ary` to be called without raising `NoMethodError` (Mikhail
873
+ Dieterle)
874
+ * `any_instance` properly restores private methods (Sidu Ponnappa)
875
+
876
+ ### 2.6.0 / 2011-05-12
877
+
878
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.5.0...v2.6.0)
879
+
880
+ Enhancements
881
+
882
+ * Add support for `any_instance.stub` and `any_instance.should_receive` (Sidu
883
+ Ponnappa and Andy Lindeman)
884
+
885
+ Bug fixes
886
+
887
+ * fix bug in which multiple chains with shared messages ending in hashes failed
888
+ to return the correct value
889
+
890
+ ### 2.5.0 / 2011-02-05
891
+
892
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.4.0...v2.5.0)
893
+
894
+ Bug fixes
895
+
896
+ * message expectation counts now work in combination with a stub (Damian
897
+ Nurzynski)
898
+ * fix failure message when message received with incorrect args (Josep M.
899
+ Bach)
900
+
901
+ ### 2.4.0 / 2011-01-02
902
+
903
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.3.0...v2.4.0)
904
+
905
+ No functional changes in this release, which was made to align with the
906
+ rspec-core-2.4.0 release.
907
+
908
+ ### 2.3.0 / 2010-12-12
909
+
910
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.2.0...v2.3.0)
911
+
912
+ Bug fixes
913
+
914
+ * Fix our Marshal extension so that it does not interfere with objects that
915
+ have their own `@mock_proxy` instance variable. (Myron Marston)
916
+
917
+ ### 2.2.0 / 2010-11-28
918
+
919
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.1.0...v2.2.0)
920
+
921
+ Enhancements
922
+
923
+ * Added "rspec/mocks/standalone" for exploring the rspec-mocks in irb.
924
+
925
+ Bug fix
926
+
927
+ * Eliminate warning on splat args without parens (Gioele Barabucci)
928
+ * Fix bug where `obj.should_receive(:foo).with(stub.as_null_object)` would pass
929
+ with a false positive.
930
+
931
+ ### 2.1.0 / 2010-11-07
932
+
933
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.0.1...v2.1.0)
934
+
935
+ Bug fixes
936
+
937
+ * Fix serialization of stubbed object (Josep M Bach)
938
+
939
+ ### 2.0.0 / 2010-10-10
940
+
941
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.0.0.beta.22...v2.0.0)
942
+
943
+ ### 2.0.0.rc / 2010-10-05
944
+
945
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.0.0.beta.22...v2.0.0.rc)
946
+
947
+ Enhancements
948
+
949
+ * support passing a block to an expectation block (Nicolas Braem)
950
+ * `obj.should_receive(:msg) {|&block| ... }`
951
+
952
+ Bug fixes
953
+
954
+ * Fix YAML serialization of stub (Myron Marston)
955
+ * Fix rdoc rake task (Hans de Graaff)
956
+
957
+ ### 2.0.0.beta.22 / 2010-09-12
958
+
959
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.0.0.beta.20...v2.0.0.beta.22)
960
+
961
+ Bug fixes
962
+
963
+ * fixed regression that broke `obj.stub_chain(:a, :b => :c)`
964
+ * fixed regression that broke `obj.stub_chain(:a, :b) { :c }`
965
+ * `respond_to?` always returns true when using `as_null_object`