mocha 1.8.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -0
  3. data/.rubocop.yml +3 -0
  4. data/.rubocop_todo.yml +7 -30
  5. data/.yardopts +1 -0
  6. data/README.md +40 -13
  7. data/RELEASE.md +97 -0
  8. data/Rakefile +10 -7
  9. data/bin/build-matrix +1 -2
  10. data/docs/CNAME +1 -1
  11. data/docs/Mocha.html +132 -5
  12. data/docs/Mocha/API.html +437 -206
  13. data/docs/Mocha/ClassMethods.html +13 -16
  14. data/docs/Mocha/Configuration.html +1126 -227
  15. data/docs/Mocha/Expectation.html +420 -267
  16. data/docs/Mocha/ExpectationError.html +5 -10
  17. data/docs/Mocha/ExpectationErrorFactory.html +9 -18
  18. data/docs/Mocha/Hooks.html +12 -27
  19. data/docs/Mocha/Integration.html +3 -3
  20. data/docs/Mocha/Integration/MiniTest.html +3 -3
  21. data/docs/Mocha/Integration/MiniTest/Adapter.html +5 -6
  22. data/docs/Mocha/Integration/TestUnit.html +3 -3
  23. data/docs/Mocha/Integration/TestUnit/Adapter.html +5 -6
  24. data/docs/Mocha/Mock.html +202 -162
  25. data/docs/Mocha/ObjectMethods.html +121 -68
  26. data/docs/Mocha/ParameterMatchers.html +21 -109
  27. data/docs/Mocha/ParameterMatchers/AllOf.html +4 -5
  28. data/docs/Mocha/ParameterMatchers/AnyOf.html +4 -5
  29. data/docs/Mocha/ParameterMatchers/AnyParameters.html +3 -3
  30. data/docs/Mocha/ParameterMatchers/Anything.html +3 -3
  31. data/docs/Mocha/ParameterMatchers/Base.html +8 -15
  32. data/docs/Mocha/ParameterMatchers/Equals.html +4 -5
  33. data/docs/Mocha/ParameterMatchers/EquivalentUri.html +3 -3
  34. data/docs/Mocha/ParameterMatchers/HasEntries.html +4 -5
  35. data/docs/Mocha/ParameterMatchers/HasEntry.html +4 -5
  36. data/docs/Mocha/ParameterMatchers/HasKey.html +4 -5
  37. data/docs/Mocha/ParameterMatchers/HasValue.html +4 -5
  38. data/docs/Mocha/ParameterMatchers/Includes.html +4 -5
  39. data/docs/Mocha/ParameterMatchers/InstanceOf.html +4 -5
  40. data/docs/Mocha/ParameterMatchers/IsA.html +3 -3
  41. data/docs/Mocha/ParameterMatchers/KindOf.html +4 -5
  42. data/docs/Mocha/ParameterMatchers/Not.html +4 -5
  43. data/docs/Mocha/ParameterMatchers/Optionally.html +3 -3
  44. data/docs/Mocha/ParameterMatchers/RegexpMatches.html +4 -5
  45. data/docs/Mocha/ParameterMatchers/RespondsWith.html +4 -5
  46. data/docs/Mocha/ParameterMatchers/YamlEquivalent.html +4 -5
  47. data/docs/Mocha/Sequence.html +3 -3
  48. data/docs/Mocha/StateMachine.html +13 -25
  49. data/docs/Mocha/StateMachine/State.html +4 -5
  50. data/docs/Mocha/StateMachine/StatePredicate.html +4 -5
  51. data/docs/Mocha/StubbingError.html +3 -3
  52. data/docs/_index.html +4 -22
  53. data/docs/class_list.html +1 -1
  54. data/docs/file.COPYING.html +3 -3
  55. data/docs/file.MIT-LICENSE.html +3 -3
  56. data/docs/file.README.html +46 -16
  57. data/docs/file.RELEASE.html +130 -3
  58. data/docs/frames.html +1 -1
  59. data/docs/index.html +46 -16
  60. data/docs/js/app.js +11 -0
  61. data/docs/method_list.html +117 -37
  62. data/docs/top-level-namespace.html +3 -3
  63. data/gemfiles/Gemfile.minitest.5.11.3 +7 -0
  64. data/init.rb +1 -3
  65. data/lib/mocha.rb +8 -0
  66. data/lib/mocha/any_instance_method.rb +11 -53
  67. data/lib/mocha/api.rb +120 -56
  68. data/lib/mocha/block_matcher.rb +31 -0
  69. data/lib/mocha/cardinality.rb +26 -11
  70. data/lib/mocha/class_methods.rb +17 -15
  71. data/lib/mocha/configuration.rb +351 -67
  72. data/lib/mocha/deprecation.rb +2 -1
  73. data/lib/mocha/detection/test_unit.rb +1 -3
  74. data/lib/mocha/exception_raiser.rb +2 -1
  75. data/lib/mocha/expectation.rb +102 -63
  76. data/lib/mocha/expectation_error.rb +1 -3
  77. data/lib/mocha/expectation_list.rb +6 -6
  78. data/lib/mocha/inspect.rb +28 -26
  79. data/lib/mocha/instance_method.rb +19 -2
  80. data/lib/mocha/integration.rb +1 -3
  81. data/lib/mocha/integration/mini_test.rb +7 -0
  82. data/lib/mocha/integration/test_unit.rb +7 -0
  83. data/lib/mocha/invocation.rb +77 -0
  84. data/lib/mocha/macos_version.rb +5 -0
  85. data/lib/mocha/minitest.rb +6 -1
  86. data/lib/mocha/mock.rb +46 -31
  87. data/lib/mocha/mockery.rb +25 -61
  88. data/lib/mocha/names.rb +1 -1
  89. data/lib/mocha/object_methods.rb +13 -19
  90. data/lib/mocha/parameter_matchers.rb +1 -1
  91. data/lib/mocha/parameter_matchers/all_of.rb +1 -1
  92. data/lib/mocha/parameter_matchers/any_of.rb +1 -1
  93. data/lib/mocha/parameter_matchers/equivalent_uri.rb +0 -9
  94. data/lib/mocha/parameter_matchers/includes.rb +2 -0
  95. data/lib/mocha/parameter_matchers/instance_methods.rb +18 -0
  96. data/lib/mocha/raised_exception.rb +11 -0
  97. data/lib/mocha/return_values.rb +3 -3
  98. data/lib/mocha/setup.rb +5 -0
  99. data/lib/mocha/single_return_value.rb +2 -1
  100. data/lib/mocha/singleton_class.rb +9 -0
  101. data/lib/mocha/stubbed_method.rb +127 -0
  102. data/lib/mocha/test_unit.rb +6 -1
  103. data/lib/mocha/thrower.rb +2 -1
  104. data/lib/mocha/thrown_object.rb +12 -0
  105. data/lib/mocha/version.rb +1 -1
  106. data/lib/mocha/yield_parameters.rb +5 -11
  107. data/mocha.gemspec +1 -3
  108. data/test/acceptance/acceptance_test_helper.rb +7 -0
  109. data/test/acceptance/bug_18914_test.rb +0 -1
  110. data/test/acceptance/bug_21465_test.rb +0 -1
  111. data/test/acceptance/bug_21563_test.rb +0 -1
  112. data/test/acceptance/display_matching_invocations_alongside_expectations_test.rb +69 -0
  113. data/test/acceptance/exception_rescue_test.rb +1 -2
  114. data/test/acceptance/expectations_on_multiple_methods_test.rb +0 -1
  115. data/test/acceptance/expected_invocation_count_test.rb +2 -3
  116. data/test/acceptance/failure_messages_test.rb +16 -1
  117. data/test/acceptance/issue_272_test.rb +1 -2
  118. data/test/acceptance/issue_65_test.rb +0 -1
  119. data/test/acceptance/issue_70_test.rb +0 -1
  120. data/test/acceptance/mocha_example_test.rb +0 -1
  121. data/test/acceptance/mocha_test_result_test.rb +0 -1
  122. data/test/acceptance/mock_built_with_first_argument_type_being_string_test.rb +99 -0
  123. data/test/acceptance/mock_test.rb +47 -6
  124. data/test/acceptance/mocked_methods_dispatch_test.rb +0 -1
  125. data/test/acceptance/multiple_expectations_failure_message_test.rb +0 -1
  126. data/test/acceptance/multiple_yielding_test.rb +56 -0
  127. data/test/acceptance/optional_parameters_test.rb +0 -1
  128. data/test/acceptance/parameter_matcher_test.rb +0 -1
  129. data/test/acceptance/partial_mocks_test.rb +0 -1
  130. data/test/acceptance/prepend_test.rb +0 -1
  131. data/test/acceptance/prevent_use_of_mocha_outside_test_test.rb +0 -1
  132. data/test/acceptance/raise_exception_test.rb +0 -1
  133. data/test/acceptance/return_value_test.rb +0 -1
  134. data/test/acceptance/sequence_test.rb +0 -1
  135. data/test/acceptance/states_test.rb +0 -1
  136. data/test/acceptance/stub_any_instance_method_defined_on_superclass_test.rb +1 -2
  137. data/test/acceptance/stub_any_instance_method_test.rb +20 -1
  138. data/test/acceptance/stub_class_method_defined_on_active_record_association_proxy_test.rb +0 -1
  139. data/test/acceptance/stub_class_method_defined_on_class_test.rb +0 -1
  140. data/test/acceptance/stub_class_method_defined_on_module_test.rb +0 -1
  141. data/test/acceptance/stub_class_method_defined_on_superclass_test.rb +1 -2
  142. data/test/acceptance/stub_everything_test.rb +0 -1
  143. data/test/acceptance/stub_instance_method_defined_on_active_record_association_proxy_test.rb +0 -1
  144. data/test/acceptance/stub_instance_method_defined_on_class_and_aliased_test.rb +0 -1
  145. data/test/acceptance/stub_instance_method_defined_on_class_test.rb +0 -1
  146. data/test/acceptance/stub_instance_method_defined_on_kernel_module_test.rb +0 -1
  147. data/test/acceptance/stub_instance_method_defined_on_module_test.rb +0 -1
  148. data/test/acceptance/stub_instance_method_defined_on_object_class_test.rb +0 -1
  149. data/test/acceptance/stub_instance_method_defined_on_singleton_class_test.rb +0 -1
  150. data/test/acceptance/stub_instance_method_defined_on_superclass_test.rb +0 -1
  151. data/test/acceptance/stub_method_defined_on_module_and_aliased_test.rb +0 -1
  152. data/test/acceptance/stub_module_method_test.rb +0 -1
  153. data/test/acceptance/stub_test.rb +0 -1
  154. data/test/acceptance/stubba_example_test.rb +0 -1
  155. data/test/acceptance/stubba_test_result_test.rb +0 -1
  156. data/test/acceptance/stubbing_error_backtrace_test.rb +4 -5
  157. data/test/acceptance/stubbing_frozen_object_test.rb +0 -1
  158. data/test/acceptance/stubbing_method_accepting_block_parameter_test.rb +0 -1
  159. data/test/acceptance/stubbing_method_unnecessarily_test.rb +5 -5
  160. data/test/acceptance/stubbing_nil_test.rb +5 -5
  161. data/test/acceptance/stubbing_non_existent_any_instance_method_test.rb +27 -11
  162. data/test/acceptance/stubbing_non_existent_class_method_test.rb +11 -11
  163. data/test/acceptance/stubbing_non_existent_instance_method_test.rb +11 -11
  164. data/test/acceptance/stubbing_non_public_any_instance_method_test.rb +8 -8
  165. data/test/acceptance/stubbing_non_public_class_method_test.rb +9 -9
  166. data/test/acceptance/stubbing_non_public_instance_method_test.rb +9 -9
  167. data/test/acceptance/stubbing_on_non_mock_object_test.rb +5 -5
  168. data/test/acceptance/stubbing_same_class_method_on_parent_and_child_classes_test.rb +0 -1
  169. data/test/acceptance/throw_test.rb +0 -1
  170. data/test/acceptance/unexpected_invocation_test.rb +0 -1
  171. data/test/acceptance/unstubbing_test.rb +0 -1
  172. data/test/acceptance/yielding_test.rb +78 -0
  173. data/test/integration/shared_tests.rb +5 -3
  174. data/test/method_definer.rb +11 -17
  175. data/test/test_runner.rb +2 -0
  176. data/test/unit/any_instance_method_test.rb +60 -35
  177. data/test/unit/cardinality_test.rb +41 -23
  178. data/test/unit/central_test.rb +0 -1
  179. data/test/unit/class_methods_test.rb +1 -1
  180. data/test/unit/configuration_test.rb +12 -12
  181. data/test/unit/exception_raiser_test.rb +10 -5
  182. data/test/unit/expectation_list_test.rb +13 -11
  183. data/test/unit/expectation_test.rb +117 -103
  184. data/test/unit/instance_method_test.rb +282 -0
  185. data/test/unit/mock_test.rb +28 -19
  186. data/test/unit/mockery_test.rb +8 -11
  187. data/test/unit/module_methods_test.rb +2 -3
  188. data/test/unit/object_inspect_test.rb +6 -4
  189. data/test/unit/object_methods_test.rb +3 -2
  190. data/test/unit/parameter_matchers/equivalent_uri_test.rb +0 -9
  191. data/test/unit/parameter_matchers/has_entries_test.rb +1 -1
  192. data/test/unit/parameter_matchers/has_entry_test.rb +1 -1
  193. data/test/unit/parameter_matchers/has_key_test.rb +1 -1
  194. data/test/unit/parameter_matchers/has_value_test.rb +1 -1
  195. data/test/unit/parameter_matchers/includes_test.rb +1 -1
  196. data/test/unit/parameter_matchers/responds_with_test.rb +1 -1
  197. data/test/unit/return_values_test.rb +25 -20
  198. data/test/unit/single_return_value_test.rb +6 -1
  199. data/test/unit/thrower_test.rb +7 -2
  200. data/test/unit/yield_parameters_test.rb +35 -53
  201. metadata +18 -35
  202. data/docs/Mocha/UnexpectedInvocation.html +0 -140
  203. data/lib/mocha/class_method.rb +0 -113
  204. data/lib/mocha/mini_test.rb +0 -5
  205. data/lib/mocha/module_method.rb +0 -6
  206. data/lib/mocha/module_methods.rb +0 -10
  207. data/lib/mocha/multiple_yields.rb +0 -15
  208. data/lib/mocha/no_yields.rb +0 -5
  209. data/lib/mocha/parameter_matchers/object.rb +0 -15
  210. data/lib/mocha/single_yield.rb +0 -13
  211. data/lib/mocha/standalone.rb +0 -4
  212. data/lib/mocha/unexpected_invocation.rb +0 -24
  213. data/lib/mocha_standalone.rb +0 -4
  214. data/test/acceptance/mock_with_initializer_block_test.rb +0 -56
  215. data/test/unit/class_method_test.rb +0 -254
  216. data/test/unit/multiple_yields_test.rb +0 -16
  217. data/test/unit/no_yields_test.rb +0 -16
  218. data/test/unit/single_yield_test.rb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0c0293e3246e6c08b3091803488531187ef47253ec22fbcd0b48921e401aa9e
4
- data.tar.gz: 34c50006ebf871ed458dd97d2057caeeca9ae329a41da8d9abeb8e818a9f7042
3
+ metadata.gz: de1adbcbd8913b597601bdb8f9b028ee9ecc4be3bb61aadb2cd6afa959e34262
4
+ data.tar.gz: bca0a0766a125de6bb4a03b73416c6801435fc7587ce68eedd09ca883e48613b
5
5
  SHA512:
6
- metadata.gz: d3004d3ac125a41336d2138c35cf581cb05c51b96b7ecd895422715e84db62dca230ad96828c2a8c5f08b7ac0e00d0721aee20a8d17f6ef88b810c0b025bae3b
7
- data.tar.gz: 3dab739556bbab55d0ded0fb0f81368a7b17f3cc5a635e65a9b5c5e6c9a5b2700f0b4f1d15db887fd8b477d89b28f8147382a4403589de265a6c6e7335adc724
6
+ metadata.gz: 04d916cde854d9b112ca1130d6933e8fc4f86ef0d95ca3d857ddd33b1992173f6d735463caaacaa6305d42eb22dd8e3e445cc9eabf3071434e0d6af58923710d
7
+ data.tar.gz: 18d7cc9adc53c84c2f26f3c1b32069678eb394791cadfed2986696f0ecdca29223c787f22e6f22f54c6a534969f117af3ddfe075598647ad4afc0f57aac1d473
@@ -0,0 +1 @@
1
+ github: floehopper
@@ -8,6 +8,9 @@ AllCops:
8
8
  Style/Alias:
9
9
  EnforcedStyle: prefer_alias_method
10
10
 
11
+ Style/Documentation:
12
+ Enabled: false
13
+
11
14
  # Enumerable#each_with_object only available since Ruby v1.9
12
15
  Style/EachWithObject:
13
16
  Enabled: false
@@ -1,49 +1,26 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-07-26 12:42:35 +0100 using RuboCop version 0.58.2.
3
+ # on 2019-11-16 18:15:36 +0000 using RuboCop version 0.58.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 53
9
+ # Offense count: 57
10
10
  Metrics/AbcSize:
11
- Max: 39
11
+ Max: 26
12
12
 
13
- # Offense count: 2
14
- # Configuration parameters: CountComments, ExcludedMethods.
15
- # ExcludedMethods: refine
16
- Metrics/BlockLength:
17
- Max: 48
18
-
19
- # Offense count: 22
13
+ # Offense count: 23
20
14
  # Configuration parameters: CountComments.
21
15
  Metrics/ClassLength:
22
- Max: 368
23
-
24
- # Offense count: 4
25
- Metrics/CyclomaticComplexity:
26
- Max: 9
16
+ Max: 366
27
17
 
28
- # Offense count: 173
18
+ # Offense count: 172
29
19
  # Configuration parameters: CountComments.
30
20
  Metrics/MethodLength:
31
21
  Max: 31
32
22
 
33
- # Offense count: 1
34
- # Configuration parameters: CountComments.
35
- Metrics/ModuleLength:
36
- Max: 158
37
-
38
- # Offense count: 5
39
- Metrics/PerceivedComplexity:
40
- Max: 11
41
-
42
- # Offense count: 105
43
- Style/Documentation:
44
- Enabled: false
45
-
46
- # Offense count: 501
23
+ # Offense count: 545
47
24
  # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
48
25
  # URISchemes: http, https
49
26
  Metrics/LineLength:
data/.yardopts CHANGED
@@ -1,3 +1,4 @@
1
+ --output-dir docs
1
2
  --template-path yard-templates
2
3
  --no-private
3
4
  lib/mocha/api.rb
data/README.md CHANGED
@@ -3,11 +3,14 @@
3
3
 
4
4
  ### Description
5
5
 
6
- * A Ruby library for mocking and stubbing.
6
+ * A Ruby library for [mocking](http://xunitpatterns.com/Mock%20Object.html) and [stubbing](http://xunitpatterns.com/Test%20Stub.html) - but deliberately not (yet) [faking](http://xunitpatterns.com/Fake%20Object.html) or [spying](http://xunitpatterns.com/Test%20Spy.html).
7
7
  * A unified, simple and readable syntax for both full & partial mocking.
8
8
  * Built-in support for MiniTest and Test::Unit.
9
9
  * Supported by many other test frameworks.
10
10
 
11
+ ### Intended Usage
12
+ Mocha is intended to be used in unit tests for the [Mock Object](http://xunitpatterns.com/Mock%20Object.html) or [Test Stub](http://xunitpatterns.com/Test%20Stub.html) types of [Test Double](http://xunitpatterns.com/Test%20Double.html), not the [Fake Object](http://xunitpatterns.com/Fake%20Object.html) or [Test Spy](http://xunitpatterns.com/Test%20Spy.html) types. Although it would be possible to extend Mocha to allow the implementation of fakes and spies, we have chosen to keep it focused on mocks and stubs.
13
+
11
14
  ### Installation
12
15
 
13
16
  #### Gem
@@ -92,14 +95,6 @@ end
92
95
 
93
96
  Note: There is no need to use a require statement to setup Mocha; RSpec does this itself.
94
97
 
95
- #### Rails Plugin
96
-
97
- Install the Rails plugin...
98
-
99
- $ rails plugin install git://github.com/freerange/mocha.git
100
-
101
- Note: As of version 0.9.8, the Mocha plugin is not automatically setup at plugin load time. Instead it must be manually setup e.g. at the bottom of your `test_helper.rb`.
102
-
103
98
  ##### MiniTest
104
99
 
105
100
  ```ruby
@@ -107,15 +102,34 @@ Note: As of version 0.9.8, the Mocha plugin is not automatically setup at plugin
107
102
  require 'mocha/minitest'
108
103
  ```
109
104
 
105
+ ##### Cucumber
106
+
107
+ ```ruby
108
+ # In e.g. features/support/mocha.rb
109
+ require 'mocha/api'
110
+
111
+ World(Mocha::API)
112
+
113
+ Around do |scenario, block|
114
+ begin
115
+ mocha_setup
116
+ block.call
117
+ mocha_verify
118
+ ensure
119
+ mocha_teardown
120
+ end
121
+ end
122
+ ```
123
+
110
124
  #### Known Issues
111
125
 
126
+ * In Mocha v1.10.0 an undocumented feature of `API#mock`, `API#stub` & `API#stub_everything` was changed. Previously when these methods were passed a single symbol, they returned a mock object that responded to the method identified by the symbol. Now Passing a single symbol is equivalent to passing a single string, i.e. it now defines the "name" of the mock object.
112
127
  * In Mocha v1.2.0 there is a scenario where stubbing a class method originally defined in a module hangs the Ruby interpreter due to [a bug in Ruby v2.3.1](https://bugs.ruby-lang.org/issues/12832). See #272. This was fixed in Mocha v1.2.1.
113
128
  * Since v1.1.0 Mocha has used prepended modules internally for stubbing methods. There is [an obscure Ruby bug](https://bugs.ruby-lang.org/issues/12876) in many (but not all) versions of Ruby between v2.0 & v2.3 which under certain circumstances may cause your Ruby interpreter to hang. See the Ruby bug report for more details. The bug has been fixed in Ruby v2.3.3 & v2.4.0.
114
129
  * Stubbing an aliased class method, where the original method is defined in a module that's used to `extend` the class doesn't work in Ruby 1.8.x. See stub_method_defined_on_module_and_aliased_test.rb for an example of this behaviour.
115
130
  * 0.13.x versions cause a harmless, but annoying, deprecation warning when used with Rails 3.2.0-3.2.12, 3.1.0-3.1.10 & 3.0.0-3.0.19.
116
131
  * 0.11.x versions don't work with Rails 3.2.13 (`TypeError: superclass mismatch for class ExpectationError`). See #115.
117
132
  * Versions 0.10.2, 0.10.3 & 0.11.0 of the Mocha gem were broken. Please do not use these versions.
118
- * Versions 0.9.6 & 0.9.7 of the Mocha Rails plugin were broken. Please do not use these versions.
119
133
 
120
134
  ### Usage
121
135
 
@@ -256,7 +270,15 @@ end
256
270
 
257
271
  ### Thread safety
258
272
 
259
- Mocha is currently *not* thread-safe. There are two main reasons for this: (a) in multi-threaded code Mocha exceptions may be raised in a thread other than the one which is running the test and thus a Mocha exception may not be correctly intercepted by Mocha exception handling code; and (b) partial mocking changes the state of objects in the `ObjectSpace` which is shared across all threads in the Ruby process and this access to what is effectively global state is not synchronized.
273
+ Mocha currently *does not* attempt to be thread-safe.
274
+
275
+ #### Can I test multi-threaded code with Mocha?
276
+
277
+ The short answer is no. In multi-threaded code Mocha exceptions may be raised in a thread other than the one which is running the test and thus a Mocha exception may not be correctly intercepted by Mocha exception handling code.
278
+
279
+ #### Can I run my tests across multiple threads?
280
+
281
+ Maybe, but probably not. Partial mocking changes the state of objects in the `ObjectSpace` which is shared across all threads in the Ruby process and this access to what is effectively global state is not synchronized. So, for example, if two tests are running concurrently and one uses `#any_instance` to modify a class, both tests will see those changes immediately.
260
282
 
261
283
  ### Expectation matching / invocation order
262
284
 
@@ -277,6 +299,11 @@ If you want, Mocha can generate a warning or raise an exception when:
277
299
 
278
300
  See the [documentation](https://mocha.jamesmead.org/Mocha/Configuration.html) for `Mocha::Configuration` for further details.
279
301
 
302
+ ##### MOCHA_OPTIONS
303
+ `MOCHA_OPTIONS` is an environment variable whose value can be set to a comma-separated list, so that we can specify multiple options e.g. `MOCHA_OPTIONS=debug,use_test_unit_gem`.
304
+ Only the following values are currently recognized and have an effect:
305
+ * `debug`: Enables a debug mode which will output backtraces for each deprecation warning. This is useful for finding where in the test suite the deprecated calls are.
306
+
280
307
  ### Useful Links
281
308
 
282
309
  * [Official Documentation](https://mocha.jamesmead.org)
@@ -301,13 +328,13 @@ See this [list of contributors](https://github.com/freerange/mocha/graphs/contri
301
328
  * Check Travis CI build is passing - https://travis-ci.org/freerange/mocha
302
329
 
303
330
  * Sign in to Google Analytics - https://analytics.google.com/analytics/web/
304
- * Find the web property ID for Go Free Range Ltd > Mocha Documentation (UA-45002715-2)
331
+ * Find the web property ID for floehopper (625523) > Mocha Documentation (UA-625523-7)
305
332
  * Generate documentation:
306
333
 
307
334
  ```bash
308
335
  $ MOCHA_GENERATE_DOCS=true bundle install
309
336
 
310
- $ MOCHA_GENERATE_DOCS=true GOOGLE_ANALYTICS_WEB_PROPERTY_ID=UA-45002715-2 rake generate_docs
337
+ $ MOCHA_GENERATE_DOCS=true GOOGLE_ANALYTICS_WEB_PROPERTY_ID=UA-625523-7 rake generate_docs
311
338
  ```
312
339
  * Commit documentation & push to GitHub
313
340
  * Sign in to rubygems.org and find API key - https://rubygems.org/profile/edit
data/RELEASE.md CHANGED
@@ -1,5 +1,102 @@
1
1
  # Release Notes
2
2
 
3
+ ## 1.11.0
4
+
5
+ ### External changes
6
+
7
+ * Add `Expectation#with_block_given` & `Expectation#with_no_block_given` (#441).
8
+ * Allows non-deprecated solution for #382. Thanks to @yemartin for reporting and to @techbelly & @nitishr for feedback.
9
+ * Fix issue with non-Array arguments passed to `Expectation#multiple_yields` (#444).
10
+ * The undocumented behaviour is now properly supported and documented.
11
+
12
+ ### Internal changes
13
+
14
+ * Move static YARD options from Rake task to `.yardopts` file - thanks to @nitishr (#429)
15
+ * Simplify implementation of yielding functionality - thanks to @nitishr (#439)
16
+ * Add missing require statement to `acceptance_test_helper.rb` (1070fc02)
17
+ * Add some baseline acceptance tests for yielding behaviour (c2cac911)
18
+ * Display a sponsor button on GitHub repo page (9fc5911b)
19
+ * Use new Deprecation.warning behaviour in `Invocation#call` (932d1166)
20
+
21
+ ## 1.10.2
22
+
23
+ * Optionally reinstate undocumented behaviour from v1.9. This introduces a new configuration option (`reinstate_undocumented_behaviour_from_v1_9`) to reinstate a couple of bits of undocumented behaviour from v1.9 which were changed in v1.10 without any prior deprecation warning (#438):
24
+ * The behaviour of `API#mock`, `API#stub` and `API#stub_everything` when called with a symbol as the first argument.
25
+ * The behaviour of `Expectation#yields` and `Expectation#multiple_yields` when the stubbed method is called without a block.
26
+
27
+ ## 1.10.1
28
+
29
+ * Ensure ObjectMethods & ClassMethods included when API extended (43778756)
30
+ * Fix regression in `any_instance` stubbing of methods on object which has an implementation of `#respond_to?` that depends on the object's internal state - thanks to @rafaelfranca for reporting & @nitishr for fixing (#432, #434, 469d4b17)
31
+
32
+ ## 1.10.0
33
+
34
+ * Improve deprecation warning when requiring 'mocha/setup' (388f44d7)
35
+ * Add documentation for Cucumber integration (13ab797b)
36
+ * Add documentation about an undocumented feature of `API#mock`, `API#stub` & `API#stub_everything` being changed (7ed2e4e7, d30c1717)
37
+
38
+ ## 1.10.0.beta.1
39
+
40
+ * Hide `ClassMethods#method_visibility` & `#method_exists?` methods to avoid clash with Rails (#428)
41
+
42
+ ## 1.10.0.alpha
43
+
44
+ ### External changes
45
+
46
+ * Remove dependency on metaclass gem (#49, #365)
47
+ * Accept symbol (as well as a string) as mock/stub name - thanks to @nitishr (#347, #353, #377)
48
+ * More realistic examples in documentation for `Expectation#yields` and `#multiple_yields` - thanks to @nitishr (#352, #383)
49
+ * Improve documentation for `Mock#responds_like` & `#responds_like_instance_of` - thanks to @nitishr (#337, #384)
50
+ * Make `Expectation#yields` & `Expectation#multiple_yields` fail when the caller of the stubbed method does not provide a block. This is a change to an undocumented aspect of the public API's behaviour. If this causes your tests to fail, then fix it by removing the unnecessary call to `Expectation#yields` or `Expectation#multiple_yields` - thanks to @nitishr (#382)
51
+ * Document `MOCHA_OPTIONS` in README - thanks to @nitishr (#311, #386)
52
+ * Add documentation to explain how Mocha is intended to be used - thanks to @nitishr (#330, #385)
53
+ * Deprecation warning if integration using 'mocha/test_unit' or 'mocha/minitest' fails - thanks to @nitishr (#229, #389, c6032d0b)
54
+ * Require at least one specified sequence for `Expectation#in_sequence` - thanks to @nitishr (#79, #396, 9020248a)
55
+ * Make signatures of `Mock#unstub` & `ObjectMethods#unstub` consistent - thanks to @nitishr (#397, f04d437)
56
+ * Deprecate requiring 'mocha/setup' (36adf880)
57
+ * Optionally display matching invocations alongside expectations - thanks to @nitishr (#178, #394, 00f0540, #410)
58
+ * Put deprecations into effect (#400, #418):
59
+ * Remove deprecated 'mocha_standalone.rb' & 'mocha/standalone.rb'
60
+ * Fail fast if no test library loaded
61
+ * Removed optional block for `Mocha::API#mock`, `#stub` & `#stub_everything`
62
+ * Remove deprecated `ParameterMatchers#has_equivalent_query_string` method
63
+ * Remove deprecated 'mocha/mini_test.rb'
64
+ * Fix typo in docs for `Mocha::Configuration.prevent` (266ce71c)
65
+ * New-style configuration (see documentation for `Mocha::Configuration`) (#407, #421)
66
+ * Deprecate support for Ruby versions earlier than v1.9 (#325, c5f8496d)
67
+ * Deprecate support for versions of test-unit & minitest which need monkey-patching (a34e1a88)
68
+ * Deprecate old-style Rails plugin (#403, 2df77134)
69
+ * Documentation fixes & improvements which also fix YARD warnings (472d5416, a2c0d64a)
70
+
71
+ ### Internal changes
72
+
73
+ * Pin minitest to v5.11.3 for Ruby v1.8.7 to fix build; minitest no longer supports Ruby v1.8.7 (4a0a580)
74
+ * Upgrade JRuby to v9.2.8.0 in Travis CI builds (aa29b3f)
75
+ * Only run rubocop for MRI Ruby versions & non-integration test builds (8f1c6af)
76
+ * Reduce duplication in any instance method class - thanks to @nitishr (#378)
77
+ * Simplify `AnyInstanceMethod`, `ClassMethod`, `InstanceMethod`, `ModuleMethod` class hierarchy - thanks to @nitishr (#381)
78
+ * Simplify `ClassMethods#method_exists?` & `ObjectMethods#method_exists?` making them consistent - thanks to @nitishr (#270, #362, #370)
79
+ * Don't override definition of `singleton_class` in `ClassMethods` - thanks to @nitishr (#391, #392)
80
+ * Do not include 'method_definer' methods into all objects (#268, #402)
81
+ * Distinguish different `ObjectMethods` modules (#268, #404)
82
+ * Pass invocation to expectation list methods - thanks to @nitishr (#408, #409, #411)
83
+ * Consistently use `assert_raises` - thanks to @nitishr (#405, #412, a66b7bed)
84
+ * Update Ruby & JRuby versions in Travis CI config (18cb1a93, eb061c53)
85
+ * Rubocop improvements (aa16ea67...6f4db70b, 2a1240e6...e95716ae)
86
+ * Fix inconsistency in CardinalityTest (aa10e0a8)
87
+ * Fix test failures on Mac OSX Catalina - thanks to @nitishr (#413, #417, #419, 8a0f2535)
88
+ * Remove default argument in `Expectation#invoke` - thanks to @nitishr (#414, #420)
89
+
90
+ ## 1.9.0
91
+
92
+ * Add TruffleRuby to Travis CI build matrix - thanks to @deepj (#354)
93
+ * Explicitly set Travis CI OS to Ubuntu Trusty 14.04 (ded1fa45)
94
+ * Expand explanation of thread-safety concerns - thanks to @techbelly (#357)
95
+ * Refactor class method and any instance method - thanks to @chrisroos (#358)
96
+ * Rely on default bundler version in Travis CI builds (3352e9c5)
97
+ * Fix local build-matrix script (11abe231)
98
+ * No need to install latest bundler in build-matrix script (8247a894)
99
+
3
100
  ## 1.8.0
4
101
 
5
102
  * Constrain rubocop version to avoid breaking Travis CI builds (05e507f5)
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ task 'test' do
17
17
  end
18
18
  end
19
19
 
20
- namespace 'test' do
20
+ namespace 'test' do # rubocop:disable Metrics/BlockLength
21
21
  unit_tests = FileList['test/unit/**/*_test.rb']
22
22
  all_acceptance_tests = FileList['test/acceptance/*_test.rb']
23
23
  ruby186_incompatible_acceptance_tests = FileList['test/acceptance/stub_class_method_defined_on_*_test.rb'] + FileList['test/acceptance/stub_instance_method_defined_on_*_test.rb']
@@ -85,13 +85,14 @@ end
85
85
 
86
86
  begin
87
87
  require 'rubocop/rake_task'
88
- if RUBY_VERSION >= '2.2.0'
88
+ if RUBY_VERSION >= '2.2.0' && (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby') && ENV['MOCHA_RUN_INTEGRATION_TESTS'].nil?
89
89
  RuboCop::RakeTask.new
90
90
  task 'test' => 'rubocop'
91
91
  end
92
92
  rescue LoadError # rubocop:disable Lint/HandleExceptions
93
93
  end
94
94
 
95
+ # rubocop:disable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
95
96
  def benchmark_test_case(klass, iterations)
96
97
  require 'benchmark'
97
98
  require 'mocha/detection/mini_test'
@@ -119,6 +120,7 @@ def benchmark_test_case(klass, iterations)
119
120
  Benchmark.realtime { iterations.times { Test::Unit::UI::Console::TestRunner.run(klass, @silent_option) } }
120
121
  end
121
122
  end
123
+ # rubocop:enable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
122
124
 
123
125
  if ENV['MOCHA_GENERATE_DOCS']
124
126
  require 'yard'
@@ -136,14 +138,15 @@ if ENV['MOCHA_GENERATE_DOCS']
136
138
 
137
139
  desc 'Generate documentation'
138
140
  YARD::Rake::YardocTask.new('yardoc' => 'docs_environment') do |task|
139
- task.options = [
140
- '--title', "Mocha #{Mocha::VERSION}",
141
- '--output-dir', 'docs'
142
- ]
141
+ task.options = ['--title', "Mocha #{Mocha::VERSION}"]
142
+ end
143
+
144
+ task 'checkout_docs_cname' do
145
+ `git checkout docs/CNAME`
143
146
  end
144
147
 
145
148
  desc 'Generate documentation'
146
- task 'generate_docs' => %w[clobber_yardoc yardoc]
149
+ task 'generate_docs' => %w[clobber_yardoc yardoc checkout_docs_cname]
147
150
  end
148
151
 
149
152
  task 'release' => 'default'
@@ -36,7 +36,6 @@ def run(ruby_version, gemfile, task = 'test')
36
36
  ENV['MOCHA_OPTIONS'] = 'debug'
37
37
  reset_bundle
38
38
  execute(
39
- with_rbenv('gem update bundler --force --no-post-install-message'),
40
39
  with_rbenv("bundle install --gemfile=#{gemfile}"),
41
40
  with_rbenv("bundle exec rake #{task}")
42
41
  )
@@ -80,4 +79,4 @@ build_configs.each do |config|
80
79
  end
81
80
  end
82
81
 
83
- puts "Missing Ruby versions: #{missing_ruby_versions.join(', ')}"
82
+ puts "Missing Ruby versions: #{missing_ruby_versions.to_a.join(', ')}"
data/docs/CNAME CHANGED
@@ -1 +1 @@
1
- mocha.jamesmead.org
1
+ mocha.jamesmead.org
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha
8
8
 
9
- &mdash; Mocha 1.8.0
9
+ &mdash; Mocha 1.11.0
10
10
 
11
11
  </title>
12
12
 
@@ -79,7 +79,7 @@
79
79
  <dl>
80
80
  <dt>Defined in:</dt>
81
81
  <dd>lib/mocha/api.rb<span class="defines">,<br />
82
- lib/mocha/hooks.rb,<br /> lib/mocha/mock.rb,<br /> lib/mocha/expectation.rb,<br /> lib/mocha/object_methods.rb,<br /> lib/mocha/class_methods.rb,<br /> lib/mocha/parameter_matchers.rb,<br /> lib/mocha/parameter_matchers/not.rb,<br /> lib/mocha/parameter_matchers/base.rb,<br /> lib/mocha/parameter_matchers/is_a.rb,<br /> lib/mocha/parameter_matchers/all_of.rb,<br /> lib/mocha/parameter_matchers/any_of.rb,<br /> lib/mocha/parameter_matchers/equals.rb,<br /> lib/mocha/parameter_matchers/object.rb,<br /> lib/mocha/parameter_matchers/has_key.rb,<br /> lib/mocha/parameter_matchers/kind_of.rb,<br /> lib/mocha/parameter_matchers/anything.rb,<br /> lib/mocha/parameter_matchers/includes.rb,<br /> lib/mocha/parameter_matchers/has_entry.rb,<br /> lib/mocha/parameter_matchers/has_value.rb,<br /> lib/mocha/parameter_matchers/optionally.rb,<br /> lib/mocha/parameter_matchers/has_entries.rb,<br /> lib/mocha/parameter_matchers/instance_of.rb,<br /> lib/mocha/parameter_matchers/responds_with.rb,<br /> lib/mocha/parameter_matchers/any_parameters.rb,<br /> lib/mocha/parameter_matchers/equivalent_uri.rb,<br /> lib/mocha/parameter_matchers/regexp_matches.rb,<br /> lib/mocha/parameter_matchers/yaml_equivalent.rb,<br /> lib/mocha/state_machine.rb,<br /> lib/mocha/sequence.rb,<br /> lib/mocha/configuration.rb,<br /> lib/mocha/expectation_error_factory.rb,<br /> lib/mocha/expectation_error.rb,<br /> lib/mocha/stubbing_error.rb,<br /> lib/mocha/unexpected_invocation.rb,<br /> lib/mocha/integration/test_unit/adapter.rb,<br /> lib/mocha/integration/mini_test/adapter.rb</span>
82
+ lib/mocha/hooks.rb,<br /> lib/mocha/mock.rb,<br /> lib/mocha/expectation.rb,<br /> lib/mocha/object_methods.rb,<br /> lib/mocha/class_methods.rb,<br /> lib/mocha/parameter_matchers.rb,<br /> lib/mocha/parameter_matchers/not.rb,<br /> lib/mocha/parameter_matchers/base.rb,<br /> lib/mocha/parameter_matchers/is_a.rb,<br /> lib/mocha/parameter_matchers/all_of.rb,<br /> lib/mocha/parameter_matchers/any_of.rb,<br /> lib/mocha/parameter_matchers/equals.rb,<br /> lib/mocha/parameter_matchers/has_key.rb,<br /> lib/mocha/parameter_matchers/kind_of.rb,<br /> lib/mocha/parameter_matchers/anything.rb,<br /> lib/mocha/parameter_matchers/includes.rb,<br /> lib/mocha/parameter_matchers/has_entry.rb,<br /> lib/mocha/parameter_matchers/has_value.rb,<br /> lib/mocha/parameter_matchers/optionally.rb,<br /> lib/mocha/parameter_matchers/has_entries.rb,<br /> lib/mocha/parameter_matchers/instance_of.rb,<br /> lib/mocha/parameter_matchers/responds_with.rb,<br /> lib/mocha/parameter_matchers/any_parameters.rb,<br /> lib/mocha/parameter_matchers/equivalent_uri.rb,<br /> lib/mocha/parameter_matchers/regexp_matches.rb,<br /> lib/mocha/parameter_matchers/yaml_equivalent.rb,<br /> lib/mocha/parameter_matchers/instance_methods.rb,<br /> lib/mocha/state_machine.rb,<br /> lib/mocha/sequence.rb,<br /> lib/mocha/configuration.rb,<br /> lib/mocha/expectation_error_factory.rb,<br /> lib/mocha/expectation_error.rb,<br /> lib/mocha/stubbing_error.rb,<br /> lib/mocha/integration/test_unit/adapter.rb,<br /> lib/mocha/integration/mini_test/adapter.rb</span>
83
83
  </dd>
84
84
  </dl>
85
85
 
@@ -93,7 +93,7 @@
93
93
 
94
94
 
95
95
 
96
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Mocha/Configuration.html" title="Mocha::Configuration (class)">Configuration</a></span>, <span class='object_link'><a href="Mocha/Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span>, <span class='object_link'><a href="Mocha/ExpectationError.html" title="Mocha::ExpectationError (class)">ExpectationError</a></span>, <span class='object_link'><a href="Mocha/ExpectationErrorFactory.html" title="Mocha::ExpectationErrorFactory (class)">ExpectationErrorFactory</a></span>, <span class='object_link'><a href="Mocha/Mock.html" title="Mocha::Mock (class)">Mock</a></span>, <span class='object_link'><a href="Mocha/Sequence.html" title="Mocha::Sequence (class)">Sequence</a></span>, <span class='object_link'><a href="Mocha/StateMachine.html" title="Mocha::StateMachine (class)">StateMachine</a></span>, <span class='object_link'><a href="Mocha/StubbingError.html" title="Mocha::StubbingError (class)">StubbingError</a></span>, <span class='object_link'><a href="Mocha/UnexpectedInvocation.html" title="Mocha::UnexpectedInvocation (class)">UnexpectedInvocation</a></span>
96
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Mocha/Configuration.html" title="Mocha::Configuration (class)">Configuration</a></span>, <span class='object_link'><a href="Mocha/Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span>, <span class='object_link'><a href="Mocha/ExpectationError.html" title="Mocha::ExpectationError (class)">ExpectationError</a></span>, <span class='object_link'><a href="Mocha/ExpectationErrorFactory.html" title="Mocha::ExpectationErrorFactory (class)">ExpectationErrorFactory</a></span>, <span class='object_link'><a href="Mocha/Mock.html" title="Mocha::Mock (class)">Mock</a></span>, <span class='object_link'><a href="Mocha/Sequence.html" title="Mocha::Sequence (class)">Sequence</a></span>, <span class='object_link'><a href="Mocha/StateMachine.html" title="Mocha::StateMachine (class)">StateMachine</a></span>, <span class='object_link'><a href="Mocha/StubbingError.html" title="Mocha::StubbingError (class)">StubbingError</a></span>
97
97
 
98
98
 
99
99
  </p>
@@ -104,7 +104,134 @@
104
104
 
105
105
 
106
106
 
107
+
108
+ <h2>
109
+ Class Method Summary
110
+ <small><a href="#" class="summary_toggle">collapse</a></small>
111
+ </h2>
112
+
113
+ <ul class="summary">
114
+
115
+ <li class="public ">
116
+ <span class="summary_signature">
117
+
118
+ <a href="#configure-class_method" title="configure (class method)">.<strong>configure</strong> {|configuration| ... } &#x21d2; Object </a>
119
+
120
+
121
+
122
+ </span>
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+ <span class="summary_desc"><div class='inline'>
133
+ <p>Allows setting of configuration options.</p>
134
+ </div></span>
135
+
136
+ </li>
107
137
 
138
+
139
+ </ul>
140
+
141
+
142
+
143
+
144
+ <div id="class_method_details" class="method_details_list">
145
+ <h2>Class Method Details</h2>
146
+
147
+
148
+ <div class="method_details first">
149
+ <h3 class="signature first" id="configure-class_method">
150
+
151
+ .<strong>configure</strong> {|configuration| ... } &#x21d2; <tt><span class='object_link'>Object</span></tt>
152
+
153
+
154
+
155
+
156
+
157
+ </h3><div class="docstring">
158
+ <div class="discussion">
159
+
160
+ <p>Allows setting of configuration options. See <span class='object_link'><a href="Mocha/Configuration.html" title="Mocha::Configuration (class)">Configuration</a></span> for the available options.</p>
161
+
162
+ <p>Typically the configuration is set globally in a <code>test_helper.rb</code> or <code>spec_helper.rb</code> file.</p>
163
+
164
+
165
+ </div>
166
+ </div>
167
+ <div class="tags">
168
+
169
+ <div class="examples">
170
+ <p class="tag_title">Examples:</p>
171
+
172
+
173
+ <p class="example_title"><div class='inline'>
174
+ <p>Setting multiple configuration options</p>
175
+ </div></p>
176
+
177
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="" title="Mocha (module)">Mocha</a></span></span><span class='period'>.</span><span class='id identifier rubyid_configure'>configure</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span>
178
+ <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_stubbing_method_unnecessarily'>stubbing_method_unnecessarily</span> <span class='op'>=</span> <span class='symbol'>:prevent</span>
179
+ <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_stubbing_method_on_non_mock_object'>stubbing_method_on_non_mock_object</span> <span class='op'>=</span> <span class='symbol'>:warn</span>
180
+ <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_stubbing_method_on_nil'>stubbing_method_on_nil</span> <span class='op'>=</span> <span class='symbol'>:allow</span>
181
+ <span class='kw'>end</span></code></pre>
182
+
183
+ </div>
184
+
185
+ <p class="tag_title">Yield Parameters:</p>
186
+ <ul class="yieldparam">
187
+
188
+ <li>
189
+
190
+ <span class='name'>configuration</span>
191
+
192
+
193
+ <span class='type'>(<tt><span class='object_link'><a href="Mocha/Configuration.html" title="Mocha::Configuration (class)">Configuration</a></span></tt>)</span>
194
+
195
+
196
+
197
+ &mdash;
198
+ <div class='inline'>
199
+ <p>the configuration for modification</p>
200
+ </div>
201
+
202
+ </li>
203
+
204
+ </ul>
205
+
206
+ <p class="tag_title">See Also:</p>
207
+ <ul class="see">
208
+
209
+ <li><span class='object_link'><a href="Mocha/Configuration.html" title="Mocha::Configuration (class)">Configuration</a></span></li>
210
+
211
+ </ul>
212
+
213
+ </div><table class="source_code">
214
+ <tr>
215
+ <td>
216
+ <pre class="lines">
217
+
218
+
219
+ 17
220
+ 18
221
+ 19</pre>
222
+ </td>
223
+ <td>
224
+ <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 17</span>
225
+
226
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_configure'>configure</span>
227
+ <span class='kw'>yield</span> <span class='id identifier rubyid_configuration'>configuration</span>
228
+ <span class='kw'>end</span></pre>
229
+ </td>
230
+ </tr>
231
+ </table>
232
+ </div>
233
+
234
+ </div>
108
235
 
109
236
  <script async src="https://www.googletagmanager.com/gtag/js?id=UA-625523-7"></script>
110
237
  <script>
@@ -117,9 +244,9 @@
117
244
  </div>
118
245
 
119
246
  <div id="footer">
120
- Generated on Tue Jan 15 17:13:05 2019 by
247
+ Generated on Mon Dec 16 18:49:50 2019 by
121
248
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
122
- 0.9.16 (ruby-2.5.3).
249
+ 0.9.20 (ruby-2.6.5).
123
250
  </div>
124
251
 
125
252
  </div>