mofo 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/CHANGELOG +4 -0
  2. data/lib/microformat.rb +11 -1
  3. data/lib/microformat/simple.rb +21 -17
  4. data/lib/mofo/hentry.rb +1 -1
  5. data/lib/mofo/hreview.rb +0 -2
  6. data/lib/mofo/rel_tag.rb +0 -1
  7. data/tests/fixtures/bob.html +69 -0
  8. data/tests/fixtures/chowhound.html +1052 -0
  9. data/tests/fixtures/corkd.html +403 -0
  10. data/tests/fixtures/events.html +39 -0
  11. data/tests/fixtures/fake.html +1 -0
  12. data/tests/fixtures/fauxtank.html +535 -0
  13. data/tests/fixtures/hatom.html +1101 -0
  14. data/tests/fixtures/simple.html +5 -0
  15. data/tests/fixtures/upcoming.html +335 -0
  16. data/tests/format_test.rb +230 -0
  17. data/tests/hatom_test.rb +39 -0
  18. data/tests/test_helper.rb +6 -0
  19. data/tests/xoxo_test.rb +49 -0
  20. data/vendor/testspec-0.2.0/ChangeLog +120 -0
  21. data/vendor/testspec-0.2.0/README +206 -0
  22. data/vendor/testspec-0.2.0/ROADMAP +3 -0
  23. data/vendor/testspec-0.2.0/Rakefile +86 -0
  24. data/vendor/testspec-0.2.0/SPECS +101 -0
  25. data/vendor/testspec-0.2.0/TODO +1 -0
  26. data/vendor/testspec-0.2.0/bin/specrb +103 -0
  27. data/vendor/testspec-0.2.0/examples/stack.rb +38 -0
  28. data/vendor/testspec-0.2.0/examples/stack_spec.rb +119 -0
  29. data/vendor/testspec-0.2.0/lib/test/spec.rb +366 -0
  30. data/vendor/testspec-0.2.0/lib/test/spec/dox.rb +114 -0
  31. data/vendor/testspec-0.2.0/lib/test/spec/rdox.rb +25 -0
  32. data/vendor/testspec-0.2.0/lib/test/spec/should-output.rb +48 -0
  33. data/vendor/testspec-0.2.0/rdoc/classes/Kernel.html +105 -0
  34. data/vendor/testspec-0.2.0/rdoc/classes/Object.html +154 -0
  35. data/vendor/testspec-0.2.0/rdoc/classes/Test/Spec.html +132 -0
  36. data/vendor/testspec-0.2.0/rdoc/classes/Test/Spec/DefinitionError.html +111 -0
  37. data/vendor/testspec-0.2.0/rdoc/classes/Test/Spec/Should.html +863 -0
  38. data/vendor/testspec-0.2.0/rdoc/classes/Test/Spec/ShouldNot.html +411 -0
  39. data/vendor/testspec-0.2.0/rdoc/classes/Test/Spec/TestCase.html +220 -0
  40. data/vendor/testspec-0.2.0/rdoc/classes/Test/Spec/TestCase/ClassMethods.html +290 -0
  41. data/vendor/testspec-0.2.0/rdoc/classes/Test/Spec/TestCase/InstanceMethods.html +195 -0
  42. data/vendor/testspec-0.2.0/rdoc/classes/Test/Unit/UI/RDox/TestRunner.html +222 -0
  43. data/vendor/testspec-0.2.0/rdoc/classes/Test/Unit/UI/SpecDox/TestRunner.html +468 -0
  44. data/vendor/testspec-0.2.0/rdoc/created.rid +1 -0
  45. data/vendor/testspec-0.2.0/rdoc/files/README.html +409 -0
  46. data/vendor/testspec-0.2.0/rdoc/files/ROADMAP.html +112 -0
  47. data/vendor/testspec-0.2.0/rdoc/files/SPECS.html +365 -0
  48. data/vendor/testspec-0.2.0/rdoc/files/lib/test/spec/dox_rb.html +108 -0
  49. data/vendor/testspec-0.2.0/rdoc/files/lib/test/spec/rdox_rb.html +108 -0
  50. data/vendor/testspec-0.2.0/rdoc/files/lib/test/spec/should-output_rb.html +114 -0
  51. data/vendor/testspec-0.2.0/rdoc/files/lib/test/spec_rb.html +123 -0
  52. data/vendor/testspec-0.2.0/rdoc/fr_class_index.html +37 -0
  53. data/vendor/testspec-0.2.0/rdoc/fr_file_index.html +33 -0
  54. data/vendor/testspec-0.2.0/rdoc/fr_method_index.html +95 -0
  55. data/vendor/testspec-0.2.0/rdoc/index.html +24 -0
  56. data/vendor/testspec-0.2.0/rdoc/rdoc-style.css +208 -0
  57. data/vendor/testspec-0.2.0/test/spec_dox.rb +39 -0
  58. data/vendor/testspec-0.2.0/test/spec_flexmock.rb +210 -0
  59. data/vendor/testspec-0.2.0/test/spec_mocha.rb +118 -0
  60. data/vendor/testspec-0.2.0/test/spec_nestedcontexts.rb +26 -0
  61. data/vendor/testspec-0.2.0/test/spec_should-output.rb +26 -0
  62. data/vendor/testspec-0.2.0/test/spec_testspec.rb +311 -0
  63. data/vendor/testspec-0.2.0/test/spec_testspec_order.rb +26 -0
  64. data/vendor/testspec-0.2.0/test/test_testunit.rb +21 -0
  65. metadata +81 -2
@@ -0,0 +1,411 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Test::Spec::ShouldNot</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Test::Spec::ShouldNot</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/test/spec_rb.html">
59
+ lib/test/spec.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="../../Object.html">
69
+ Object
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000014">==</a>&nbsp;&nbsp;
92
+ <a href="#M000017">=~</a>&nbsp;&nbsp;
93
+ <a href="#M000018">_raise</a>&nbsp;&nbsp;
94
+ <a href="#M000015">be</a>&nbsp;&nbsp;
95
+ <a href="#M000021">be_nil</a>&nbsp;&nbsp;
96
+ <a href="#M000013">equal</a>&nbsp;&nbsp;
97
+ <a href="#M000016">match</a>&nbsp;&nbsp;
98
+ <a href="#M000023">method_missing</a>&nbsp;&nbsp;
99
+ <a href="#M000012">new</a>&nbsp;&nbsp;
100
+ <a href="#M000020">nil</a>&nbsp;&nbsp;
101
+ <a href="#M000022">not</a>&nbsp;&nbsp;
102
+ <a href="#M000019">throw</a>&nbsp;&nbsp;
103
+ </div>
104
+ </div>
105
+
106
+ </div>
107
+
108
+
109
+ <!-- if includes -->
110
+ <div id="includes">
111
+ <h3 class="section-bar">Included Modules</h3>
112
+
113
+ <div id="includes-list">
114
+ <span class="include-name">Test::Unit::Assertions</span>
115
+ </div>
116
+ </div>
117
+
118
+ <div id="section">
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+ <!-- if method_list -->
128
+ <div id="methods">
129
+ <h3 class="section-bar">Public Class methods</h3>
130
+
131
+ <div id="method-M000012" class="method-detail">
132
+ <a name="M000012"></a>
133
+
134
+ <div class="method-heading">
135
+ <a href="#M000012" class="method-signature">
136
+ <span class="method-name">new</span><span class="method-args">(object)</span>
137
+ </a>
138
+ </div>
139
+
140
+ <div class="method-description">
141
+ <p><a class="source-toggle" href="#"
142
+ onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
143
+ <div class="method-source-code" id="M000012-source">
144
+ <pre>
145
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 163</span>
146
+ 163: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">object</span>)
147
+ 164: <span class="ruby-ivar">@object</span> = <span class="ruby-identifier">object</span>
148
+ 165: <span class="ruby-keyword kw">end</span>
149
+ </pre>
150
+ </div>
151
+ </div>
152
+ </div>
153
+
154
+ <h3 class="section-bar">Public Instance methods</h3>
155
+
156
+ <div id="method-M000014" class="method-detail">
157
+ <a name="M000014"></a>
158
+
159
+ <div class="method-heading">
160
+ <span class="method-name">==</span><span class="method-args">(value)</span>
161
+ </div>
162
+
163
+ <div class="method-description">
164
+ <p>
165
+ Alias for <a href="ShouldNot.html#M000013">equal</a>
166
+ </p>
167
+ </div>
168
+ </div>
169
+
170
+ <div id="method-M000017" class="method-detail">
171
+ <a name="M000017"></a>
172
+
173
+ <div class="method-heading">
174
+ <span class="method-name">=~</span><span class="method-args">(value)</span>
175
+ </div>
176
+
177
+ <div class="method-description">
178
+ <p>
179
+ Alias for <a href="ShouldNot.html#M000016">match</a>
180
+ </p>
181
+ </div>
182
+ </div>
183
+
184
+ <div id="method-M000018" class="method-detail">
185
+ <a name="M000018"></a>
186
+
187
+ <div class="method-heading">
188
+ <a href="#M000018" class="method-signature">
189
+ <span class="method-name">_raise</span><span class="method-args">(*args)</span>
190
+ </a>
191
+ </div>
192
+
193
+ <div class="method-description">
194
+ <p><a class="source-toggle" href="#"
195
+ onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
196
+ <div class="method-source-code" id="M000018-source">
197
+ <pre>
198
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 189</span>
199
+ 189: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_raise</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
200
+ 190: <span class="ruby-identifier">assert_nothing_raised</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-ivar">@object</span>)
201
+ 191: <span class="ruby-keyword kw">end</span>
202
+ </pre>
203
+ </div>
204
+ </div>
205
+ </div>
206
+
207
+ <div id="method-M000015" class="method-detail">
208
+ <a name="M000015"></a>
209
+
210
+ <div class="method-heading">
211
+ <a href="#M000015" class="method-signature">
212
+ <span class="method-name">be</span><span class="method-args">(*value)</span>
213
+ </a>
214
+ </div>
215
+
216
+ <div class="method-description">
217
+ <p><a class="source-toggle" href="#"
218
+ onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
219
+ <div class="method-source-code" id="M000015-source">
220
+ <pre>
221
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 172</span>
222
+ 172: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">be</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">value</span>)
223
+ 173: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">size</span>
224
+ 174: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span>
225
+ 175: <span class="ruby-keyword kw">self</span>
226
+ 176: <span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span>
227
+ 177: <span class="ruby-identifier">assert_not_same</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">first</span>, <span class="ruby-ivar">@object</span>
228
+ 178: <span class="ruby-keyword kw">else</span>
229
+ 179: <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;should.be needs zero or one argument&quot;</span>
230
+ 180: <span class="ruby-keyword kw">end</span>
231
+ 181: <span class="ruby-keyword kw">end</span>
232
+ </pre>
233
+ </div>
234
+ </div>
235
+ </div>
236
+
237
+ <div id="method-M000021" class="method-detail">
238
+ <a name="M000021"></a>
239
+
240
+ <div class="method-heading">
241
+ <span class="method-name">be_nil</span><span class="method-args">()</span>
242
+ </div>
243
+
244
+ <div class="method-description">
245
+ <p>
246
+ Alias for <a href="ShouldNot.html#M000020">nil</a>
247
+ </p>
248
+ </div>
249
+ </div>
250
+
251
+ <div id="method-M000013" class="method-detail">
252
+ <a name="M000013"></a>
253
+
254
+ <div class="method-heading">
255
+ <a href="#M000013" class="method-signature">
256
+ <span class="method-name">equal</span><span class="method-args">(value)</span>
257
+ </a>
258
+ </div>
259
+
260
+ <div class="method-description">
261
+ <p><a class="source-toggle" href="#"
262
+ onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
263
+ <div class="method-source-code" id="M000013-source">
264
+ <pre>
265
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 167</span>
266
+ 167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">equal</span>(<span class="ruby-identifier">value</span>)
267
+ 168: <span class="ruby-identifier">assert_not_equal</span> <span class="ruby-identifier">value</span>, <span class="ruby-ivar">@object</span>
268
+ 169: <span class="ruby-keyword kw">end</span>
269
+ </pre>
270
+ </div>
271
+ </div>
272
+ </div>
273
+
274
+ <div id="method-M000016" class="method-detail">
275
+ <a name="M000016"></a>
276
+
277
+ <div class="method-heading">
278
+ <a href="#M000016" class="method-signature">
279
+ <span class="method-name">match</span><span class="method-args">(value)</span>
280
+ </a>
281
+ </div>
282
+
283
+ <div class="method-description">
284
+ <p><a class="source-toggle" href="#"
285
+ onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
286
+ <div class="method-source-code" id="M000016-source">
287
+ <pre>
288
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 183</span>
289
+ 183: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">match</span>(<span class="ruby-identifier">value</span>)
290
+ 184: <span class="ruby-comment cmt"># Icky Regexp check</span>
291
+ 185: <span class="ruby-identifier">assert_no_match</span> <span class="ruby-identifier">value</span>, <span class="ruby-ivar">@object</span>
292
+ 186: <span class="ruby-keyword kw">end</span>
293
+ </pre>
294
+ </div>
295
+ </div>
296
+ </div>
297
+
298
+ <div id="method-M000023" class="method-detail">
299
+ <a name="M000023"></a>
300
+
301
+ <div class="method-heading">
302
+ <a href="#M000023" class="method-signature">
303
+ <span class="method-name">method_missing</span><span class="method-args">(name, *args)</span>
304
+ </a>
305
+ </div>
306
+
307
+ <div class="method-description">
308
+ <p><a class="source-toggle" href="#"
309
+ onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
310
+ <div class="method-source-code" id="M000023-source">
311
+ <pre>
312
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 208</span>
313
+ 208: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
314
+ 209: <span class="ruby-comment cmt"># This will make raise call Kernel.raise, and self.raise call _raise.</span>
315
+ 210: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">_raise</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:raise</span>
316
+ 211:
317
+ 212: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@object</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">&quot;#{name}?&quot;</span>)
318
+ 213: <span class="ruby-identifier">assert_block</span>(<span class="ruby-node">&quot;#{name}? expected to be false.&quot;</span>) {
319
+ 214: <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@object</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-node">&quot;#{name}?&quot;</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
320
+ 215: }
321
+ 216: <span class="ruby-keyword kw">else</span>
322
+ 217: <span class="ruby-keyword kw">super</span>
323
+ 218: <span class="ruby-keyword kw">end</span>
324
+ 219: <span class="ruby-keyword kw">end</span>
325
+ </pre>
326
+ </div>
327
+ </div>
328
+ </div>
329
+
330
+ <div id="method-M000020" class="method-detail">
331
+ <a name="M000020"></a>
332
+
333
+ <div class="method-heading">
334
+ <a href="#M000020" class="method-signature">
335
+ <span class="method-name">nil</span><span class="method-args">()</span>
336
+ </a>
337
+ </div>
338
+
339
+ <div class="method-description">
340
+ <p><a class="source-toggle" href="#"
341
+ onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
342
+ <div class="method-source-code" id="M000020-source">
343
+ <pre>
344
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 197</span>
345
+ 197: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">nil</span>
346
+ 198: <span class="ruby-identifier">assert_not_nil</span> <span class="ruby-ivar">@object</span>
347
+ 199: <span class="ruby-keyword kw">end</span>
348
+ </pre>
349
+ </div>
350
+ </div>
351
+ </div>
352
+
353
+ <div id="method-M000022" class="method-detail">
354
+ <a name="M000022"></a>
355
+
356
+ <div class="method-heading">
357
+ <a href="#M000022" class="method-signature">
358
+ <span class="method-name">not</span><span class="method-args">()</span>
359
+ </a>
360
+ </div>
361
+
362
+ <div class="method-description">
363
+ <p><a class="source-toggle" href="#"
364
+ onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
365
+ <div class="method-source-code" id="M000022-source">
366
+ <pre>
367
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 203</span>
368
+ 203: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">not</span>
369
+ 204: <span class="ruby-constant">Should</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@object</span>)
370
+ 205: <span class="ruby-keyword kw">end</span>
371
+ </pre>
372
+ </div>
373
+ </div>
374
+ </div>
375
+
376
+ <div id="method-M000019" class="method-detail">
377
+ <a name="M000019"></a>
378
+
379
+ <div class="method-heading">
380
+ <a href="#M000019" class="method-signature">
381
+ <span class="method-name">throw</span><span class="method-args">()</span>
382
+ </a>
383
+ </div>
384
+
385
+ <div class="method-description">
386
+ <p><a class="source-toggle" href="#"
387
+ onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
388
+ <div class="method-source-code" id="M000019-source">
389
+ <pre>
390
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 193</span>
391
+ 193: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">throw</span>
392
+ 194: <span class="ruby-identifier">assert_nothing_thrown</span>(<span class="ruby-operator">&amp;</span><span class="ruby-ivar">@object</span>)
393
+ 195: <span class="ruby-keyword kw">end</span>
394
+ </pre>
395
+ </div>
396
+ </div>
397
+ </div>
398
+
399
+
400
+ </div>
401
+
402
+
403
+ </div>
404
+
405
+
406
+ <div id="validator-badges">
407
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
408
+ </div>
409
+
410
+ </body>
411
+ </html>
@@ -0,0 +1,220 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Test::Spec::TestCase</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Test::Spec::TestCase</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/test/spec_rb.html">
59
+ lib/test/spec.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="../../Object.html">
69
+ Object
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000003">add</a>&nbsp;&nbsp;
92
+ <a href="#M000002">new</a>&nbsp;&nbsp;
93
+ </div>
94
+ </div>
95
+
96
+ </div>
97
+
98
+
99
+ <!-- if includes -->
100
+ <div id="includes">
101
+ <h3 class="section-bar">Included Modules</h3>
102
+
103
+ <div id="includes-list">
104
+ <span class="include-name"><a href="TestCase/InstanceMethods.html">InstanceMethods</a></span>
105
+ </div>
106
+ </div>
107
+
108
+ <div id="section">
109
+
110
+ <div id="class-list">
111
+ <h3 class="section-bar">Classes and Modules</h3>
112
+
113
+ Module <a href="TestCase/ClassMethods.html" class="link">Test::Spec::TestCase::ClassMethods</a><br />
114
+ Module <a href="TestCase/InstanceMethods.html" class="link">Test::Spec::TestCase::InstanceMethods</a><br />
115
+
116
+ </div>
117
+
118
+
119
+
120
+
121
+ <div id="attribute-list">
122
+ <h3 class="section-bar">Attributes</h3>
123
+
124
+ <div class="name-list">
125
+ <table>
126
+ <tr class="top-aligned-row context-row">
127
+ <td class="context-item-name">name</td>
128
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
129
+ <td class="context-item-desc"></td>
130
+ </tr>
131
+ <tr class="top-aligned-row context-row">
132
+ <td class="context-item-name">position</td>
133
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
134
+ <td class="context-item-desc"></td>
135
+ </tr>
136
+ <tr class="top-aligned-row context-row">
137
+ <td class="context-item-name">testcase</td>
138
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
139
+ <td class="context-item-desc"></td>
140
+ </tr>
141
+ </table>
142
+ </div>
143
+ </div>
144
+
145
+
146
+
147
+ <!-- if method_list -->
148
+ <div id="methods">
149
+ <h3 class="section-bar">Public Class methods</h3>
150
+
151
+ <div id="method-M000002" class="method-detail">
152
+ <a name="M000002"></a>
153
+
154
+ <div class="method-heading">
155
+ <a href="#M000002" class="method-signature">
156
+ <span class="method-name">new</span><span class="method-args">(name, parent=nil)</span>
157
+ </a>
158
+ </div>
159
+
160
+ <div class="method-description">
161
+ <p><a class="source-toggle" href="#"
162
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
163
+ <div class="method-source-code" id="M000002-source">
164
+ <pre>
165
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 307</span>
166
+ 307: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">parent</span>=<span class="ruby-keyword kw">nil</span>)
167
+ 308: <span class="ruby-ivar">@testcase</span> = <span class="ruby-constant">Class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Test</span><span class="ruby-operator">::</span><span class="ruby-constant">Unit</span><span class="ruby-operator">::</span><span class="ruby-constant">TestCase</span>) {
168
+ 309: <span class="ruby-identifier">include</span> <span class="ruby-constant">InstanceMethods</span>
169
+ 310: <span class="ruby-identifier">extend</span> <span class="ruby-constant">ClassMethods</span>
170
+ 311: }
171
+ 312:
172
+ 313: <span class="ruby-ivar">@@POSITION</span> = <span class="ruby-ivar">@@POSITION</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
173
+ 314: <span class="ruby-ivar">@testcase</span>.<span class="ruby-identifier">init</span>(<span class="ruby-identifier">name</span>, <span class="ruby-ivar">@@POSITION</span>, <span class="ruby-identifier">parent</span>)
174
+ 315: <span class="ruby-keyword kw">end</span>
175
+ </pre>
176
+ </div>
177
+ </div>
178
+ </div>
179
+
180
+ <h3 class="section-bar">Public Instance methods</h3>
181
+
182
+ <div id="method-M000003" class="method-detail">
183
+ <a name="M000003"></a>
184
+
185
+ <div class="method-heading">
186
+ <a href="#M000003" class="method-signature">
187
+ <span class="method-name">add</span><span class="method-args">(&amp;block)</span>
188
+ </a>
189
+ </div>
190
+
191
+ <div class="method-description">
192
+ <p><a class="source-toggle" href="#"
193
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
194
+ <div class="method-source-code" id="M000003-source">
195
+ <pre>
196
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 317</span>
197
+ 317: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
198
+ 318: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;context needs a block&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>.<span class="ruby-identifier">nil?</span>
199
+ 319:
200
+ 320: <span class="ruby-ivar">@testcase</span>.<span class="ruby-identifier">class_eval</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
201
+ 321: <span class="ruby-keyword kw">self</span>
202
+ 322: <span class="ruby-keyword kw">end</span>
203
+ </pre>
204
+ </div>
205
+ </div>
206
+ </div>
207
+
208
+
209
+ </div>
210
+
211
+
212
+ </div>
213
+
214
+
215
+ <div id="validator-badges">
216
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
217
+ </div>
218
+
219
+ </body>
220
+ </html>