mocha 0.11.3 → 0.11.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. data/README.rdoc +3 -3
  2. data/RELEASE.rdoc +3 -0
  3. data/Rakefile +1 -3
  4. data/lib/mocha/version.rb +1 -1
  5. data/mocha.gemspec +1 -1
  6. metadata +12 -67
  7. data/doc/.nojekyll +0 -0
  8. data/doc/Mocha.html +0 -112
  9. data/doc/Mocha/API.html +0 -898
  10. data/doc/Mocha/ClassMethods.html +0 -246
  11. data/doc/Mocha/Configuration.html +0 -471
  12. data/doc/Mocha/Expectation.html +0 -2570
  13. data/doc/Mocha/Mock.html +0 -830
  14. data/doc/Mocha/ObjectMethods.html +0 -668
  15. data/doc/Mocha/ParameterMatchers.html +0 -2715
  16. data/doc/Mocha/ParameterMatchers/AllOf.html +0 -137
  17. data/doc/Mocha/ParameterMatchers/AnyOf.html +0 -137
  18. data/doc/Mocha/ParameterMatchers/AnyParameters.html +0 -136
  19. data/doc/Mocha/ParameterMatchers/Anything.html +0 -136
  20. data/doc/Mocha/ParameterMatchers/Base.html +0 -419
  21. data/doc/Mocha/ParameterMatchers/Equals.html +0 -137
  22. data/doc/Mocha/ParameterMatchers/HasEntries.html +0 -137
  23. data/doc/Mocha/ParameterMatchers/HasEntry.html +0 -137
  24. data/doc/Mocha/ParameterMatchers/HasKey.html +0 -137
  25. data/doc/Mocha/ParameterMatchers/HasValue.html +0 -137
  26. data/doc/Mocha/ParameterMatchers/Includes.html +0 -137
  27. data/doc/Mocha/ParameterMatchers/InstanceOf.html +0 -137
  28. data/doc/Mocha/ParameterMatchers/IsA.html +0 -136
  29. data/doc/Mocha/ParameterMatchers/KindOf.html +0 -137
  30. data/doc/Mocha/ParameterMatchers/Not.html +0 -137
  31. data/doc/Mocha/ParameterMatchers/Optionally.html +0 -136
  32. data/doc/Mocha/ParameterMatchers/QueryStringMatches.html +0 -136
  33. data/doc/Mocha/ParameterMatchers/RegexpMatches.html +0 -137
  34. data/doc/Mocha/ParameterMatchers/RespondsWith.html +0 -137
  35. data/doc/Mocha/ParameterMatchers/YamlEquivalent.html +0 -137
  36. data/doc/Mocha/Sequence.html +0 -133
  37. data/doc/Mocha/StateMachine.html +0 -510
  38. data/doc/Mocha/StateMachine/State.html +0 -125
  39. data/doc/Mocha/StateMachine/StatePredicate.html +0 -125
  40. data/doc/Mocha/StubbingError.html +0 -134
  41. data/doc/Mocha/UnexpectedInvocation.html +0 -124
  42. data/doc/_index.html +0 -481
  43. data/doc/class_list.html +0 -47
  44. data/doc/css/common.css +0 -1
  45. data/doc/css/full_list.css +0 -55
  46. data/doc/css/style.css +0 -322
  47. data/doc/file.COPYING.html +0 -72
  48. data/doc/file.MIT-LICENSE.html +0 -86
  49. data/doc/file.README.html +0 -153
  50. data/doc/file.RELEASE.html +0 -954
  51. data/doc/file.misc.html +0 -108
  52. data/doc/file.mocha.html +0 -90
  53. data/doc/file.stubba.html +0 -129
  54. data/doc/file_list.html +0 -67
  55. data/doc/frames.html +0 -13
  56. data/doc/index.html +0 -153
  57. data/doc/js/app.js +0 -205
  58. data/doc/js/full_list.js +0 -173
  59. data/doc/js/jquery.js +0 -16
  60. data/doc/method_list.html +0 -510
  61. data/doc/top-level-namespace.html +0 -105
@@ -1,246 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Module: Mocha::ClassMethods
8
-
9
- &mdash; Mocha 0.11.3
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- relpath = '..';
19
- if (relpath != '') relpath += '/';
20
- </script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
-
26
-
27
- </head>
28
- <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
- <div id="header">
34
- <div id="menu">
35
-
36
- <a href="../_index.html">Index (C)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../Mocha.html" title="Mocha (module)">Mocha</a></span></span>
38
- &raquo;
39
- <span class="title">ClassMethods</span>
40
-
41
-
42
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
- </div>
44
-
45
- <div id="search">
46
-
47
- <a id="class_list_link" href="#">Class List</a>
48
-
49
- <a id="method_list_link" href="#">Method List</a>
50
-
51
- <a id="file_list_link" href="#">File List</a>
52
-
53
- </div>
54
- <div class="clear"></div>
55
- </div>
56
-
57
- <iframe id="search_frame"></iframe>
58
-
59
- <div id="content"><h1>Module: Mocha::ClassMethods
60
-
61
-
62
-
63
- </h1>
64
-
65
- <dl class="box">
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
- <dt class="r1 last">Defined in:</dt>
75
- <dd class="r1 last">lib/mocha/object.rb</dd>
76
-
77
- </dl>
78
- <div class="clear"></div>
79
-
80
- <h2>Overview</h2><div class="docstring">
81
- <div class="discussion">
82
-
83
- <p>Methods added to all classes to allow mocking and stubbing on real (i.e.
84
- non-mock) objects.</p>
85
-
86
-
87
- </div>
88
- </div>
89
- <div class="tags">
90
-
91
-
92
- </div>
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <h2>
101
- Instance Method Summary
102
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
103
- </h2>
104
-
105
- <ul class="summary">
106
-
107
- <li class="public ">
108
- <span class="summary_signature">
109
-
110
- <a href="#any_instance-instance_method" title="#any_instance (instance method)">- (Mock) <strong>any_instance</strong> </a>
111
-
112
-
113
-
114
- </span>
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
- <span class="summary_desc"><div class='inline'>
124
- <p>A mock object which will detect calls to any instance of this class.</p>
125
- </div></span>
126
-
127
- </li>
128
-
129
-
130
- </ul>
131
-
132
-
133
-
134
-
135
- <div id="instance_method_details" class="method_details_list">
136
- <h2>Instance Method Details</h2>
137
-
138
-
139
- <div class="method_details first">
140
- <p class="signature first" id="any_instance-instance_method">
141
-
142
- - (<tt><span class='object_link'><a href="Mock.html" title="Mocha::Mock (class)">Mock</a></span></tt>) <strong>any_instance</strong>
143
-
144
-
145
-
146
- </p><div class="docstring">
147
- <div class="discussion">
148
-
149
- <p>A mock object which will detect calls to any instance of this class.</p>
150
-
151
-
152
- </div>
153
- </div>
154
- <div class="tags">
155
-
156
- <div class="examples">
157
- <h3>Examples:</h3>
158
-
159
- <h4><div class='inline'>
160
- <p>Return false to invocation of <tt>Product#save</tt> for any instance of
161
- <tt>Product</tt>.</p>
162
- </div></h4>
163
- <pre class="example code"><span class='const'>Product</span><span class='period'>.</span><span class='id identifier rubyid_any_instance'>any_instance</span><span class='period'>.</span><span class='id identifier rubyid_stubs'>stubs</span><span class='lparen'>(</span><span class='symbol'>:save</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_returns'>returns</span><span class='lparen'>(</span><span class='kw'>false</span><span class='rparen'>)</span>
164
- <span class='id identifier rubyid_product_1'>product_1</span> <span class='op'>=</span> <span class='const'>Product</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
165
- <span class='id identifier rubyid_assert_equal'>assert_equal</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_product_1'>product_1</span><span class='period'>.</span><span class='id identifier rubyid_save'>save</span>
166
- <span class='id identifier rubyid_product_2'>product_2</span> <span class='op'>=</span> <span class='const'>Product</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
167
- <span class='id identifier rubyid_assert_equal'>assert_equal</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_product_2'>product_2</span><span class='period'>.</span><span class='id identifier rubyid_save'>save</span></pre>
168
-
169
- </div>
170
-
171
- <h3>Returns:</h3>
172
- <ul class="return">
173
-
174
- <li>
175
-
176
-
177
- <span class='type'>(<tt><span class='object_link'><a href="Mock.html" title="Mocha::Mock (class)">Mock</a></span></tt>)</span>
178
-
179
-
180
-
181
- &mdash;
182
- <div class='inline'>
183
- <p>a mock object which will detect calls to any instance of this class.</p>
184
- </div>
185
-
186
- </li>
187
-
188
- </ul>
189
- <h3>Raises:</h3>
190
- <ul class="raise">
191
-
192
- <li>
193
-
194
-
195
- <span class='type'>(<tt><span class='object_link'><a href="StubbingError.html" title="Mocha::StubbingError (class)">StubbingError</a></span></tt>)</span>
196
-
197
-
198
-
199
- &mdash;
200
- <div class='inline'>
201
- <p>if attempting to stub method which is not allowed.</p>
202
- </div>
203
-
204
- </li>
205
-
206
- </ul>
207
-
208
- </div><table class="source_code">
209
- <tr>
210
- <td>
211
- <pre class="lines">
212
-
213
-
214
- 231
215
- 232
216
- 233
217
- 234
218
- 235
219
- 236</pre>
220
- </td>
221
- <td>
222
- <pre class="code"><span class="info file"># File 'lib/mocha/object.rb', line 231</span>
223
-
224
- <span class='kw'>def</span> <span class='id identifier rubyid_any_instance'>any_instance</span>
225
- <span class='kw'>if</span> <span class='id identifier rubyid_frozen?'>frozen?</span>
226
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>StubbingError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>can't stub method on frozen object: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_mocha_inspect'>mocha_inspect</span><span class='rbrace'>}</span><span class='tstring_content'>.any_instance</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_caller'>caller</span><span class='rparen'>)</span>
227
- <span class='kw'>end</span>
228
- <span class='ivar'>@any_instance</span> <span class='op'>||=</span> <span class='const'>AnyInstance</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
229
- <span class='kw'>end</span></pre>
230
- </td>
231
- </tr>
232
- </table>
233
- </div>
234
-
235
- </div>
236
-
237
- </div>
238
-
239
- <div id="footer">
240
- Generated on Wed Apr 25 16:51:30 2012 by
241
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
242
- 0.7.5 (ruby-1.9.3).
243
- </div>
244
-
245
- </body>
246
- </html>
@@ -1,471 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Class: Mocha::Configuration
8
-
9
- &mdash; Mocha 0.11.3
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- relpath = '..';
19
- if (relpath != '') relpath += '/';
20
- </script>
21
-
22
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
-
26
-
27
- </head>
28
- <body>
29
- <script type="text/javascript" charset="utf-8">
30
- if (window.top.frames.main) document.body.className = 'frames';
31
- </script>
32
-
33
- <div id="header">
34
- <div id="menu">
35
-
36
- <a href="../_index.html">Index (C)</a> &raquo;
37
- <span class='title'><span class='object_link'><a href="../Mocha.html" title="Mocha (module)">Mocha</a></span></span>
38
- &raquo;
39
- <span class="title">Configuration</span>
40
-
41
-
42
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
- </div>
44
-
45
- <div id="search">
46
-
47
- <a id="class_list_link" href="#">Class List</a>
48
-
49
- <a id="method_list_link" href="#">Method List</a>
50
-
51
- <a id="file_list_link" href="#">File List</a>
52
-
53
- </div>
54
- <div class="clear"></div>
55
- </div>
56
-
57
- <iframe id="search_frame"></iframe>
58
-
59
- <div id="content"><h1>Class: Mocha::Configuration
60
-
61
-
62
-
63
- </h1>
64
-
65
- <dl class="box">
66
-
67
- <dt class="r1">Inherits:</dt>
68
- <dd class="r1">
69
- <span class="inheritName"><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></span>
70
-
71
- <ul class="fullTree">
72
- <li><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></li>
73
-
74
- <li class="next">Mocha::Configuration</li>
75
-
76
- </ul>
77
- <a href="#" class="inheritanceTree">show all</a>
78
-
79
- </dd>
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
- <dt class="r2 last">Defined in:</dt>
90
- <dd class="r2 last">lib/mocha/configuration.rb</dd>
91
-
92
- </dl>
93
- <div class="clear"></div>
94
-
95
- <h2>Overview</h2><div class="docstring">
96
- <div class="discussion">
97
-
98
- <p>Configuration settings.</p>
99
-
100
-
101
- </div>
102
- </div>
103
- <div class="tags">
104
-
105
-
106
- </div>
107
- <h2>Constant Summary</h2>
108
-
109
- <dl class="constants">
110
-
111
- <dt id="DEFAULTS-constant" class="">DEFAULTS =
112
-
113
- </dt>
114
- <dd><pre class="code"><span class='lbrace'>{</span>
115
- <span class='symbol'>:stubbing_method_unnecessarily</span> <span class='op'>=&gt;</span> <span class='symbol'>:allow</span><span class='comma'>,</span>
116
- <span class='symbol'>:stubbing_method_on_non_mock_object</span> <span class='op'>=&gt;</span> <span class='symbol'>:allow</span><span class='comma'>,</span>
117
- <span class='symbol'>:stubbing_non_existent_method</span> <span class='op'>=&gt;</span> <span class='symbol'>:allow</span><span class='comma'>,</span>
118
- <span class='symbol'>:stubbing_non_public_method</span> <span class='op'>=&gt;</span> <span class='symbol'>:allow</span><span class='comma'>,</span>
119
- <span class='symbol'>:stubbing_method_on_nil</span> <span class='op'>=&gt;</span> <span class='symbol'>:prevent</span><span class='comma'>,</span>
120
- <span class='rbrace'>}</span></pre></dd>
121
-
122
- </dl>
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
- <h2>
133
- Class Method Summary
134
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
135
- </h2>
136
-
137
- <ul class="summary">
138
-
139
- <li class="public ">
140
- <span class="summary_signature">
141
-
142
- <a href="#allow-class_method" title="allow (class method)">+ (Object) <strong>allow</strong>(action) { ... }</a>
143
-
144
-
145
-
146
- </span>
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
- <span class="summary_desc"><div class='inline'>
156
- <p>Allow the specified <tt>action</tt>.</p>
157
- </div></span>
158
-
159
- </li>
160
-
161
-
162
- <li class="public ">
163
- <span class="summary_signature">
164
-
165
- <a href="#prevent-class_method" title="prevent (class method)">+ (Object) <strong>prevent</strong>(action) { ... }</a>
166
-
167
-
168
-
169
- </span>
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
- <span class="summary_desc"><div class='inline'>
179
- <p>Raise a <span class='object_link'><a href="StubbingError.html" title="Mocha::StubbingError (class)">StubbingError</a></span> if if the specified <tt>action</tt> is attempted.</p>
180
- </div></span>
181
-
182
- </li>
183
-
184
-
185
- <li class="public ">
186
- <span class="summary_signature">
187
-
188
- <a href="#warn_when-class_method" title="warn_when (class method)">+ (Object) <strong>warn_when</strong>(action) { ... }</a>
189
-
190
-
191
-
192
- </span>
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
- <span class="summary_desc"><div class='inline'>
202
- <p>Warn if the specified <tt>action</tt> is attempted.</p>
203
- </div></span>
204
-
205
- </li>
206
-
207
-
208
- </ul>
209
-
210
-
211
-
212
-
213
- <div id="class_method_details" class="method_details_list">
214
- <h2>Class Method Details</h2>
215
-
216
-
217
- <div class="method_details first">
218
- <p class="signature first" id="allow-class_method">
219
-
220
- + (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>allow</strong>(action) { ... }
221
-
222
-
223
-
224
- </p><div class="docstring">
225
- <div class="discussion">
226
-
227
- <p>Allow the specified <tt>action</tt>.</p>
228
-
229
-
230
- </div>
231
- </div>
232
- <div class="tags">
233
- <h3>Parameters:</h3>
234
- <ul class="param">
235
-
236
- <li>
237
-
238
- <span class='name'>action</span>
239
-
240
-
241
- <span class='type'>(<tt>Symbol</tt>)</span>
242
-
243
-
244
-
245
- &mdash;
246
- <div class='inline'>
247
- <p>one of <tt>:stubbing_method_unnecessarily</tt>,
248
- <tt>:stubbing_method_on_non_mock_object</tt>,
249
- <tt>:stubbing_non_existent_method</tt>,
250
- <tt>:stubbing_non_public_method</tt>, <tt>:stubbing_method_on_nil</tt>.</p>
251
- </div>
252
-
253
- </li>
254
-
255
- </ul>
256
-
257
- <h3>Yields:</h3>
258
- <ul class="yield">
259
-
260
- <li>
261
-
262
-
263
- <span class='type'></span>
264
-
265
-
266
-
267
-
268
- <div class='inline'>
269
- <p>optional block during which the configuration change will be changed before
270
- being returned to its original value at the end of the block.</p>
271
- </div>
272
-
273
- </li>
274
-
275
- </ul>
276
-
277
- </div><table class="source_code">
278
- <tr>
279
- <td>
280
- <pre class="lines">
281
-
282
-
283
- 20
284
- 21
285
- 22</pre>
286
- </td>
287
- <td>
288
- <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 20</span>
289
-
290
- <span class='kw'>def</span> <span class='id identifier rubyid_allow'>allow</span><span class='lparen'>(</span><span class='id identifier rubyid_action'>action</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
291
- <span class='id identifier rubyid_change_config'>change_config</span> <span class='id identifier rubyid_action'>action</span><span class='comma'>,</span> <span class='symbol'>:allow</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
292
- <span class='kw'>end</span></pre>
293
- </td>
294
- </tr>
295
- </table>
296
- </div>
297
-
298
- <div class="method_details ">
299
- <p class="signature " id="prevent-class_method">
300
-
301
- + (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>prevent</strong>(action) { ... }
302
-
303
-
304
-
305
- </p><div class="docstring">
306
- <div class="discussion">
307
-
308
- <p>Raise a <span class='object_link'><a href="StubbingError.html" title="Mocha::StubbingError (class)">StubbingError</a></span> if if the specified <tt>action</tt> is attempted.</p>
309
-
310
-
311
- </div>
312
- </div>
313
- <div class="tags">
314
- <h3>Parameters:</h3>
315
- <ul class="param">
316
-
317
- <li>
318
-
319
- <span class='name'>action</span>
320
-
321
-
322
- <span class='type'>(<tt>Symbol</tt>)</span>
323
-
324
-
325
-
326
- &mdash;
327
- <div class='inline'>
328
- <p>one of <tt>:stubbing_method_unnecessarily</tt>,
329
- <tt>:stubbing_method_on_non_mock_object</tt>,
330
- <tt>:stubbing_non_existent_method</tt>,
331
- <tt>:stubbing_non_public_method</tt>, <tt>:stubbing_method_on_nil</tt>.</p>
332
- </div>
333
-
334
- </li>
335
-
336
- </ul>
337
-
338
- <h3>Yields:</h3>
339
- <ul class="yield">
340
-
341
- <li>
342
-
343
-
344
- <span class='type'></span>
345
-
346
-
347
-
348
-
349
- <div class='inline'>
350
- <p>optional block during which the configuration change will be changed before
351
- being returned to its original value at the end of the block.</p>
352
- </div>
353
-
354
- </li>
355
-
356
- </ul>
357
-
358
- </div><table class="source_code">
359
- <tr>
360
- <td>
361
- <pre class="lines">
362
-
363
-
364
- 46
365
- 47
366
- 48</pre>
367
- </td>
368
- <td>
369
- <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 46</span>
370
-
371
- <span class='kw'>def</span> <span class='id identifier rubyid_prevent'>prevent</span><span class='lparen'>(</span><span class='id identifier rubyid_action'>action</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
372
- <span class='id identifier rubyid_change_config'>change_config</span> <span class='id identifier rubyid_action'>action</span><span class='comma'>,</span> <span class='symbol'>:prevent</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
373
- <span class='kw'>end</span></pre>
374
- </td>
375
- </tr>
376
- </table>
377
- </div>
378
-
379
- <div class="method_details ">
380
- <p class="signature " id="warn_when-class_method">
381
-
382
- + (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>warn_when</strong>(action) { ... }
383
-
384
-
385
-
386
- </p><div class="docstring">
387
- <div class="discussion">
388
-
389
- <p>Warn if the specified <tt>action</tt> is attempted.</p>
390
-
391
-
392
- </div>
393
- </div>
394
- <div class="tags">
395
- <h3>Parameters:</h3>
396
- <ul class="param">
397
-
398
- <li>
399
-
400
- <span class='name'>action</span>
401
-
402
-
403
- <span class='type'>(<tt>Symbol</tt>)</span>
404
-
405
-
406
-
407
- &mdash;
408
- <div class='inline'>
409
- <p>one of <tt>:stubbing_method_unnecessarily</tt>,
410
- <tt>:stubbing_method_on_non_mock_object</tt>,
411
- <tt>:stubbing_non_existent_method</tt>,
412
- <tt>:stubbing_non_public_method</tt>, <tt>:stubbing_method_on_nil</tt>.</p>
413
- </div>
414
-
415
- </li>
416
-
417
- </ul>
418
-
419
- <h3>Yields:</h3>
420
- <ul class="yield">
421
-
422
- <li>
423
-
424
-
425
- <span class='type'></span>
426
-
427
-
428
-
429
-
430
- <div class='inline'>
431
- <p>optional block during which the configuration change will be changed before
432
- being returned to its original value at the end of the block.</p>
433
- </div>
434
-
435
- </li>
436
-
437
- </ul>
438
-
439
- </div><table class="source_code">
440
- <tr>
441
- <td>
442
- <pre class="lines">
443
-
444
-
445
- 33
446
- 34
447
- 35</pre>
448
- </td>
449
- <td>
450
- <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 33</span>
451
-
452
- <span class='kw'>def</span> <span class='id identifier rubyid_warn_when'>warn_when</span><span class='lparen'>(</span><span class='id identifier rubyid_action'>action</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
453
- <span class='id identifier rubyid_change_config'>change_config</span> <span class='id identifier rubyid_action'>action</span><span class='comma'>,</span> <span class='symbol'>:warn</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
454
- <span class='kw'>end</span></pre>
455
- </td>
456
- </tr>
457
- </table>
458
- </div>
459
-
460
- </div>
461
-
462
- </div>
463
-
464
- <div id="footer">
465
- Generated on Wed Apr 25 16:51:31 2012 by
466
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
467
- 0.7.5 (ruby-1.9.3).
468
- </div>
469
-
470
- </body>
471
- </html>