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,132 @@
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>Module: Test::Spec</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>Module</strong></td>
53
+ <td class="class-name-in-header">Test::Spec</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
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+
80
+ </div>
81
+
82
+
83
+ <!-- if includes -->
84
+
85
+ <div id="section">
86
+
87
+ <div id="class-list">
88
+ <h3 class="section-bar">Classes and Modules</h3>
89
+
90
+ Class <a href="Spec/DefinitionError.html" class="link">Test::Spec::DefinitionError</a><br />
91
+ Class <a href="Spec/Should.html" class="link">Test::Spec::Should</a><br />
92
+ Class <a href="Spec/ShouldNot.html" class="link">Test::Spec::ShouldNot</a><br />
93
+ Class <a href="Spec/TestCase.html" class="link">Test::Spec::TestCase</a><br />
94
+
95
+ </div>
96
+
97
+ <div id="constants-list">
98
+ <h3 class="section-bar">Constants</h3>
99
+
100
+ <div class="name-list">
101
+ <table summary="Constants">
102
+ <tr class="top-aligned-row context-row">
103
+ <td class="context-item-name">VERSION</td>
104
+ <td>=</td>
105
+ <td class="context-item-value">&quot;0.1&quot;</td>
106
+ </tr>
107
+ <tr class="top-aligned-row context-row">
108
+ <td class="context-item-name">CONTEXTS</td>
109
+ <td>=</td>
110
+ <td class="context-item-value">{}</td>
111
+ </tr>
112
+ </table>
113
+ </div>
114
+ </div>
115
+
116
+
117
+
118
+
119
+
120
+
121
+ <!-- if method_list -->
122
+
123
+
124
+ </div>
125
+
126
+
127
+ <div id="validator-badges">
128
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
129
+ </div>
130
+
131
+ </body>
132
+ </html>
@@ -0,0 +1,111 @@
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::DefinitionError</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::DefinitionError</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
+ StandardError
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+
86
+ </div>
87
+
88
+
89
+ <!-- if includes -->
90
+
91
+ <div id="section">
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <!-- if method_list -->
101
+
102
+
103
+ </div>
104
+
105
+
106
+ <div id="validator-badges">
107
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
+ </div>
109
+
110
+ </body>
111
+ </html>
@@ -0,0 +1,863 @@
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::Should</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::Should</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
+ <a href="../../../files/lib/test/spec/should-output_rb.html">
63
+ lib/test/spec/should-output.rb
64
+ </a>
65
+ <br />
66
+ </td>
67
+ </tr>
68
+
69
+ <tr class="top-aligned-row">
70
+ <td><strong>Parent:</strong></td>
71
+ <td>
72
+ <a href="../../Object.html">
73
+ Object
74
+ </a>
75
+ </td>
76
+ </tr>
77
+ </table>
78
+ </div>
79
+ <!-- banner header -->
80
+
81
+ <div id="bodyContent">
82
+
83
+
84
+
85
+ <div id="contextContent">
86
+
87
+
88
+
89
+ </div>
90
+
91
+ <div id="method-list">
92
+ <h3 class="section-bar">Methods</h3>
93
+
94
+ <div class="name-list">
95
+ <a href="#M000049">&lt;</a>&nbsp;&nbsp;
96
+ <a href="#M000050">&lt;=</a>&nbsp;&nbsp;
97
+ <a href="#M000031">==</a>&nbsp;&nbsp;
98
+ <a href="#M000051">===</a>&nbsp;&nbsp;
99
+ <a href="#M000036">=~</a>&nbsp;&nbsp;
100
+ <a href="#M000047">&gt;</a>&nbsp;&nbsp;
101
+ <a href="#M000048">&gt;=</a>&nbsp;&nbsp;
102
+ <a href="#M000042">_raise</a>&nbsp;&nbsp;
103
+ <a href="#M000027">a</a>&nbsp;&nbsp;
104
+ <a href="#M000025">add_assertion</a>&nbsp;&nbsp;
105
+ <a href="#M000026">an</a>&nbsp;&nbsp;
106
+ <a href="#M000034">be</a>&nbsp;&nbsp;
107
+ <a href="#M000040">be_a_kind_of</a>&nbsp;&nbsp;
108
+ <a href="#M000038">be_an_instance_of</a>&nbsp;&nbsp;
109
+ <a href="#M000033">be_close</a>&nbsp;&nbsp;
110
+ <a href="#M000045">be_nil</a>&nbsp;&nbsp;
111
+ <a href="#M000032">close</a>&nbsp;&nbsp;
112
+ <a href="#M000030">equal</a>&nbsp;&nbsp;
113
+ <a href="#M000046">include</a>&nbsp;&nbsp;
114
+ <a href="#M000037">instance_of</a>&nbsp;&nbsp;
115
+ <a href="#M000039">kind_of</a>&nbsp;&nbsp;
116
+ <a href="#M000035">match</a>&nbsp;&nbsp;
117
+ <a href="#M000052">method_missing</a>&nbsp;&nbsp;
118
+ <a href="#M000024">new</a>&nbsp;&nbsp;
119
+ <a href="#M000044">nil</a>&nbsp;&nbsp;
120
+ <a href="#M000028">not</a>&nbsp;&nbsp;
121
+ <a href="#M000053">output</a>&nbsp;&nbsp;
122
+ <a href="#M000041">respond_to</a>&nbsp;&nbsp;
123
+ <a href="#M000029">satisfy</a>&nbsp;&nbsp;
124
+ <a href="#M000043">throw</a>&nbsp;&nbsp;
125
+ </div>
126
+ </div>
127
+
128
+ </div>
129
+
130
+
131
+ <!-- if includes -->
132
+ <div id="includes">
133
+ <h3 class="section-bar">Included Modules</h3>
134
+
135
+ <div id="includes-list">
136
+ <span class="include-name">Test::Unit::Assertions</span>
137
+ </div>
138
+ </div>
139
+
140
+ <div id="section">
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <!-- if method_list -->
150
+ <div id="methods">
151
+ <h3 class="section-bar">Public Class methods</h3>
152
+
153
+ <div id="method-M000024" class="method-detail">
154
+ <a name="M000024"></a>
155
+
156
+ <div class="method-heading">
157
+ <a href="#M000024" class="method-signature">
158
+ <span class="method-name">new</span><span class="method-args">(object)</span>
159
+ </a>
160
+ </div>
161
+
162
+ <div class="method-description">
163
+ <p><a class="source-toggle" href="#"
164
+ onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
165
+ <div class="method-source-code" id="M000024-source">
166
+ <pre>
167
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 37</span>
168
+ 37: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">object</span>)
169
+ 38: <span class="ruby-ivar">@object</span> = <span class="ruby-identifier">object</span>
170
+ 39: <span class="ruby-keyword kw">end</span>
171
+ </pre>
172
+ </div>
173
+ </div>
174
+ </div>
175
+
176
+ <h3 class="section-bar">Public Instance methods</h3>
177
+
178
+ <div id="method-M000049" class="method-detail">
179
+ <a name="M000049"></a>
180
+
181
+ <div class="method-heading">
182
+ <a href="#M000049" class="method-signature">
183
+ <span class="method-name">&lt;</span><span class="method-args">(value)</span>
184
+ </a>
185
+ </div>
186
+
187
+ <div class="method-description">
188
+ <p><a class="source-toggle" href="#"
189
+ onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
190
+ <div class="method-source-code" id="M000049-source">
191
+ <pre>
192
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 135</span>
193
+ 135: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;</span>(<span class="ruby-identifier">value</span>)
194
+ 136: <span class="ruby-identifier">assert_operator</span> <span class="ruby-ivar">@object</span>, <span class="ruby-identifier">:&lt;</span>, <span class="ruby-identifier">value</span>
195
+ 137: <span class="ruby-keyword kw">end</span>
196
+ </pre>
197
+ </div>
198
+ </div>
199
+ </div>
200
+
201
+ <div id="method-M000050" class="method-detail">
202
+ <a name="M000050"></a>
203
+
204
+ <div class="method-heading">
205
+ <a href="#M000050" class="method-signature">
206
+ <span class="method-name">&lt;=</span><span class="method-args">(value)</span>
207
+ </a>
208
+ </div>
209
+
210
+ <div class="method-description">
211
+ <p><a class="source-toggle" href="#"
212
+ onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
213
+ <div class="method-source-code" id="M000050-source">
214
+ <pre>
215
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 139</span>
216
+ 139: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;=</span>(<span class="ruby-identifier">value</span>)
217
+ 140: <span class="ruby-identifier">assert_operator</span> <span class="ruby-ivar">@object</span>, <span class="ruby-identifier">:&lt;=</span>, <span class="ruby-identifier">value</span>
218
+ 141: <span class="ruby-keyword kw">end</span>
219
+ </pre>
220
+ </div>
221
+ </div>
222
+ </div>
223
+
224
+ <div id="method-M000031" class="method-detail">
225
+ <a name="M000031"></a>
226
+
227
+ <div class="method-heading">
228
+ <span class="method-name">==</span><span class="method-args">(value)</span>
229
+ </div>
230
+
231
+ <div class="method-description">
232
+ <p>
233
+ Alias for <a href="Should.html#M000030">equal</a>
234
+ </p>
235
+ </div>
236
+ </div>
237
+
238
+ <div id="method-M000051" class="method-detail">
239
+ <a name="M000051"></a>
240
+
241
+ <div class="method-heading">
242
+ <a href="#M000051" class="method-signature">
243
+ <span class="method-name">===</span><span class="method-args">(value)</span>
244
+ </a>
245
+ </div>
246
+
247
+ <div class="method-description">
248
+ <p><a class="source-toggle" href="#"
249
+ onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
250
+ <div class="method-source-code" id="M000051-source">
251
+ <pre>
252
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 143</span>
253
+ 143: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">===</span>(<span class="ruby-identifier">value</span>)
254
+ 144: <span class="ruby-identifier">assert_operator</span> <span class="ruby-ivar">@object</span>, <span class="ruby-identifier">:===</span>, <span class="ruby-identifier">value</span>
255
+ 145: <span class="ruby-keyword kw">end</span>
256
+ </pre>
257
+ </div>
258
+ </div>
259
+ </div>
260
+
261
+ <div id="method-M000036" class="method-detail">
262
+ <a name="M000036"></a>
263
+
264
+ <div class="method-heading">
265
+ <span class="method-name">=~</span><span class="method-args">(value)</span>
266
+ </div>
267
+
268
+ <div class="method-description">
269
+ <p>
270
+ Alias for <a href="Should.html#M000035">match</a>
271
+ </p>
272
+ </div>
273
+ </div>
274
+
275
+ <div id="method-M000047" class="method-detail">
276
+ <a name="M000047"></a>
277
+
278
+ <div class="method-heading">
279
+ <a href="#M000047" class="method-signature">
280
+ <span class="method-name">&gt;</span><span class="method-args">(value)</span>
281
+ </a>
282
+ </div>
283
+
284
+ <div class="method-description">
285
+ <p><a class="source-toggle" href="#"
286
+ onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
287
+ <div class="method-source-code" id="M000047-source">
288
+ <pre>
289
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 127</span>
290
+ 127: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&gt;</span>(<span class="ruby-identifier">value</span>)
291
+ 128: <span class="ruby-identifier">assert_operator</span> <span class="ruby-ivar">@object</span>, <span class="ruby-identifier">:&gt;</span>, <span class="ruby-identifier">value</span>
292
+ 129: <span class="ruby-keyword kw">end</span>
293
+ </pre>
294
+ </div>
295
+ </div>
296
+ </div>
297
+
298
+ <div id="method-M000048" class="method-detail">
299
+ <a name="M000048"></a>
300
+
301
+ <div class="method-heading">
302
+ <a href="#M000048" class="method-signature">
303
+ <span class="method-name">&gt;=</span><span class="method-args">(value)</span>
304
+ </a>
305
+ </div>
306
+
307
+ <div class="method-description">
308
+ <p><a class="source-toggle" href="#"
309
+ onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
310
+ <div class="method-source-code" id="M000048-source">
311
+ <pre>
312
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 131</span>
313
+ 131: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&gt;=</span>(<span class="ruby-identifier">value</span>)
314
+ 132: <span class="ruby-identifier">assert_operator</span> <span class="ruby-ivar">@object</span>, <span class="ruby-identifier">:&gt;=</span>, <span class="ruby-identifier">value</span>
315
+ 133: <span class="ruby-keyword kw">end</span>
316
+ </pre>
317
+ </div>
318
+ </div>
319
+ </div>
320
+
321
+ <div id="method-M000042" class="method-detail">
322
+ <a name="M000042"></a>
323
+
324
+ <div class="method-heading">
325
+ <a href="#M000042" class="method-signature">
326
+ <span class="method-name">_raise</span><span class="method-args">(*args)</span>
327
+ </a>
328
+ </div>
329
+
330
+ <div class="method-description">
331
+ <p><a class="source-toggle" href="#"
332
+ onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
333
+ <div class="method-source-code" id="M000042-source">
334
+ <pre>
335
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 106</span>
336
+ 106: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_raise</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
337
+ 107: <span class="ruby-identifier">args</span> = [<span class="ruby-constant">RuntimeError</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
338
+ 108: <span class="ruby-identifier">assert_raise</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-ivar">@object</span>)
339
+ 109: <span class="ruby-keyword kw">end</span>
340
+ </pre>
341
+ </div>
342
+ </div>
343
+ </div>
344
+
345
+ <div id="method-M000027" class="method-detail">
346
+ <a name="M000027"></a>
347
+
348
+ <div class="method-heading">
349
+ <a href="#M000027" class="method-signature">
350
+ <span class="method-name">a</span><span class="method-args">()</span>
351
+ </a>
352
+ </div>
353
+
354
+ <div class="method-description">
355
+ <p><a class="source-toggle" href="#"
356
+ onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
357
+ <div class="method-source-code" id="M000027-source">
358
+ <pre>
359
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 51</span>
360
+ 51: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">a</span>
361
+ 52: <span class="ruby-keyword kw">self</span>
362
+ 53: <span class="ruby-keyword kw">end</span>
363
+ </pre>
364
+ </div>
365
+ </div>
366
+ </div>
367
+
368
+ <div id="method-M000025" class="method-detail">
369
+ <a name="M000025"></a>
370
+
371
+ <div class="method-heading">
372
+ <a href="#M000025" class="method-signature">
373
+ <span class="method-name">add_assertion</span><span class="method-args">()</span>
374
+ </a>
375
+ </div>
376
+
377
+ <div class="method-description">
378
+ <p><a class="source-toggle" href="#"
379
+ onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
380
+ <div class="method-source-code" id="M000025-source">
381
+ <pre>
382
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 42</span>
383
+ 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_assertion</span>
384
+ 43: <span class="ruby-identifier">$TEST_SPEC_TESTCASE</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">$TEST_SPEC_TESTCASE</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">:add_assertion</span>)
385
+ 44: <span class="ruby-keyword kw">end</span>
386
+ </pre>
387
+ </div>
388
+ </div>
389
+ </div>
390
+
391
+ <div id="method-M000026" class="method-detail">
392
+ <a name="M000026"></a>
393
+
394
+ <div class="method-heading">
395
+ <a href="#M000026" class="method-signature">
396
+ <span class="method-name">an</span><span class="method-args">()</span>
397
+ </a>
398
+ </div>
399
+
400
+ <div class="method-description">
401
+ <p><a class="source-toggle" href="#"
402
+ onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
403
+ <div class="method-source-code" id="M000026-source">
404
+ <pre>
405
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 47</span>
406
+ 47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">an</span>
407
+ 48: <span class="ruby-keyword kw">self</span>
408
+ 49: <span class="ruby-keyword kw">end</span>
409
+ </pre>
410
+ </div>
411
+ </div>
412
+ </div>
413
+
414
+ <div id="method-M000034" class="method-detail">
415
+ <a name="M000034"></a>
416
+
417
+ <div class="method-heading">
418
+ <a href="#M000034" class="method-signature">
419
+ <span class="method-name">be</span><span class="method-args">(*value)</span>
420
+ </a>
421
+ </div>
422
+
423
+ <div class="method-description">
424
+ <p><a class="source-toggle" href="#"
425
+ onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
426
+ <div class="method-source-code" id="M000034-source">
427
+ <pre>
428
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 76</span>
429
+ 76: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">be</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">value</span>)
430
+ 77: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">size</span>
431
+ 78: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span>
432
+ 79: <span class="ruby-keyword kw">self</span>
433
+ 80: <span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span>
434
+ 81: <span class="ruby-identifier">assert_same</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">first</span>, <span class="ruby-ivar">@object</span>
435
+ 82: <span class="ruby-keyword kw">else</span>
436
+ 83: <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>
437
+ 84: <span class="ruby-keyword kw">end</span>
438
+ 85: <span class="ruby-keyword kw">end</span>
439
+ </pre>
440
+ </div>
441
+ </div>
442
+ </div>
443
+
444
+ <div id="method-M000040" class="method-detail">
445
+ <a name="M000040"></a>
446
+
447
+ <div class="method-heading">
448
+ <span class="method-name">be_a_kind_of</span><span class="method-args">(klass)</span>
449
+ </div>
450
+
451
+ <div class="method-description">
452
+ <p>
453
+ Alias for <a href="Should.html#M000039">kind_of</a>
454
+ </p>
455
+ </div>
456
+ </div>
457
+
458
+ <div id="method-M000038" class="method-detail">
459
+ <a name="M000038"></a>
460
+
461
+ <div class="method-heading">
462
+ <span class="method-name">be_an_instance_of</span><span class="method-args">(klass)</span>
463
+ </div>
464
+
465
+ <div class="method-description">
466
+ <p>
467
+ Alias for <a href="Should.html#M000037">instance_of</a>
468
+ </p>
469
+ </div>
470
+ </div>
471
+
472
+ <div id="method-M000033" class="method-detail">
473
+ <a name="M000033"></a>
474
+
475
+ <div class="method-heading">
476
+ <span class="method-name">be_close</span><span class="method-args">(value, delta)</span>
477
+ </div>
478
+
479
+ <div class="method-description">
480
+ <p>
481
+ Alias for <a href="Should.html#M000032">close</a>
482
+ </p>
483
+ </div>
484
+ </div>
485
+
486
+ <div id="method-M000045" class="method-detail">
487
+ <a name="M000045"></a>
488
+
489
+ <div class="method-heading">
490
+ <span class="method-name">be_nil</span><span class="method-args">()</span>
491
+ </div>
492
+
493
+ <div class="method-description">
494
+ <p>
495
+ Alias for <a href="Should.html#M000044">nil</a>
496
+ </p>
497
+ </div>
498
+ </div>
499
+
500
+ <div id="method-M000032" class="method-detail">
501
+ <a name="M000032"></a>
502
+
503
+ <div class="method-heading">
504
+ <a href="#M000032" class="method-signature">
505
+ <span class="method-name">close</span><span class="method-args">(value, delta)</span>
506
+ </a>
507
+ </div>
508
+
509
+ <div class="method-description">
510
+ <p><a class="source-toggle" href="#"
511
+ onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
512
+ <div class="method-source-code" id="M000032-source">
513
+ <pre>
514
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 71</span>
515
+ 71: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">delta</span>)
516
+ 72: <span class="ruby-identifier">assert_in_delta</span> <span class="ruby-identifier">value</span>, <span class="ruby-ivar">@object</span>, <span class="ruby-identifier">delta</span>
517
+ 73: <span class="ruby-keyword kw">end</span>
518
+ </pre>
519
+ </div>
520
+ </div>
521
+ </div>
522
+
523
+ <div id="method-M000030" class="method-detail">
524
+ <a name="M000030"></a>
525
+
526
+ <div class="method-heading">
527
+ <a href="#M000030" class="method-signature">
528
+ <span class="method-name">equal</span><span class="method-args">(value)</span>
529
+ </a>
530
+ </div>
531
+
532
+ <div class="method-description">
533
+ <p><a class="source-toggle" href="#"
534
+ onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
535
+ <div class="method-source-code" id="M000030-source">
536
+ <pre>
537
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 66</span>
538
+ 66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">equal</span>(<span class="ruby-identifier">value</span>)
539
+ 67: <span class="ruby-identifier">assert_equal</span> <span class="ruby-identifier">value</span>, <span class="ruby-ivar">@object</span>
540
+ 68: <span class="ruby-keyword kw">end</span>
541
+ </pre>
542
+ </div>
543
+ </div>
544
+ </div>
545
+
546
+ <div id="method-M000046" class="method-detail">
547
+ <a name="M000046"></a>
548
+
549
+ <div class="method-heading">
550
+ <a href="#M000046" class="method-signature">
551
+ <span class="method-name">include</span><span class="method-args">(value)</span>
552
+ </a>
553
+ </div>
554
+
555
+ <div class="method-description">
556
+ <p><a class="source-toggle" href="#"
557
+ onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
558
+ <div class="method-source-code" id="M000046-source">
559
+ <pre>
560
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 121</span>
561
+ 121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">include</span>(<span class="ruby-identifier">value</span>)
562
+ 122: <span class="ruby-identifier">msg</span> = <span class="ruby-identifier">build_message</span>(<span class="ruby-keyword kw">nil</span>, <span class="ruby-value str">&quot;&lt;?&gt; expected to include ?, but it didn't.&quot;</span>,
563
+ 123: <span class="ruby-ivar">@object</span>, <span class="ruby-identifier">value</span>)
564
+ 124: <span class="ruby-identifier">assert_block</span>(<span class="ruby-identifier">msg</span>) { <span class="ruby-ivar">@object</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">value</span>) }
565
+ 125: <span class="ruby-keyword kw">end</span>
566
+ </pre>
567
+ </div>
568
+ </div>
569
+ </div>
570
+
571
+ <div id="method-M000037" class="method-detail">
572
+ <a name="M000037"></a>
573
+
574
+ <div class="method-heading">
575
+ <a href="#M000037" class="method-signature">
576
+ <span class="method-name">instance_of</span><span class="method-args">(klass)</span>
577
+ </a>
578
+ </div>
579
+
580
+ <div class="method-description">
581
+ <p><a class="source-toggle" href="#"
582
+ onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
583
+ <div class="method-source-code" id="M000037-source">
584
+ <pre>
585
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 92</span>
586
+ 92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instance_of</span>(<span class="ruby-identifier">klass</span>)
587
+ 93: <span class="ruby-identifier">assert_instance_of</span> <span class="ruby-identifier">klass</span>, <span class="ruby-ivar">@object</span>
588
+ 94: <span class="ruby-keyword kw">end</span>
589
+ </pre>
590
+ </div>
591
+ </div>
592
+ </div>
593
+
594
+ <div id="method-M000039" class="method-detail">
595
+ <a name="M000039"></a>
596
+
597
+ <div class="method-heading">
598
+ <a href="#M000039" class="method-signature">
599
+ <span class="method-name">kind_of</span><span class="method-args">(klass)</span>
600
+ </a>
601
+ </div>
602
+
603
+ <div class="method-description">
604
+ <p><a class="source-toggle" href="#"
605
+ onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
606
+ <div class="method-source-code" id="M000039-source">
607
+ <pre>
608
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 97</span>
609
+ 97: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">kind_of</span>(<span class="ruby-identifier">klass</span>)
610
+ 98: <span class="ruby-identifier">assert_kind_of</span> <span class="ruby-identifier">klass</span>, <span class="ruby-ivar">@object</span>
611
+ 99: <span class="ruby-keyword kw">end</span>
612
+ </pre>
613
+ </div>
614
+ </div>
615
+ </div>
616
+
617
+ <div id="method-M000035" class="method-detail">
618
+ <a name="M000035"></a>
619
+
620
+ <div class="method-heading">
621
+ <a href="#M000035" class="method-signature">
622
+ <span class="method-name">match</span><span class="method-args">(value)</span>
623
+ </a>
624
+ </div>
625
+
626
+ <div class="method-description">
627
+ <p><a class="source-toggle" href="#"
628
+ onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
629
+ <div class="method-source-code" id="M000035-source">
630
+ <pre>
631
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 87</span>
632
+ 87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">match</span>(<span class="ruby-identifier">value</span>)
633
+ 88: <span class="ruby-identifier">assert_match</span> <span class="ruby-identifier">value</span>, <span class="ruby-ivar">@object</span>
634
+ 89: <span class="ruby-keyword kw">end</span>
635
+ </pre>
636
+ </div>
637
+ </div>
638
+ </div>
639
+
640
+ <div id="method-M000052" class="method-detail">
641
+ <a name="M000052"></a>
642
+
643
+ <div class="method-heading">
644
+ <a href="#M000052" class="method-signature">
645
+ <span class="method-name">method_missing</span><span class="method-args">(name, *args)</span>
646
+ </a>
647
+ </div>
648
+
649
+ <div class="method-description">
650
+ <p><a class="source-toggle" href="#"
651
+ onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
652
+ <div class="method-source-code" id="M000052-source">
653
+ <pre>
654
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 147</span>
655
+ 147: <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>)
656
+ 148: <span class="ruby-comment cmt"># This will make raise call Kernel.raise, and self.raise call _raise.</span>
657
+ 149: <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>
658
+ 150:
659
+ 151: <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>)
660
+ 152: <span class="ruby-identifier">assert</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>),
661
+ 153: <span class="ruby-node">&quot;#{name}? expected to be true.&quot;</span>
662
+ 154: <span class="ruby-keyword kw">else</span>
663
+ 155: <span class="ruby-keyword kw">super</span>
664
+ 156: <span class="ruby-keyword kw">end</span>
665
+ 157: <span class="ruby-keyword kw">end</span>
666
+ </pre>
667
+ </div>
668
+ </div>
669
+ </div>
670
+
671
+ <div id="method-M000044" class="method-detail">
672
+ <a name="M000044"></a>
673
+
674
+ <div class="method-heading">
675
+ <a href="#M000044" class="method-signature">
676
+ <span class="method-name">nil</span><span class="method-args">()</span>
677
+ </a>
678
+ </div>
679
+
680
+ <div class="method-description">
681
+ <p><a class="source-toggle" href="#"
682
+ onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
683
+ <div class="method-source-code" id="M000044-source">
684
+ <pre>
685
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 115</span>
686
+ 115: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">nil</span>
687
+ 116: <span class="ruby-identifier">assert_nil</span> <span class="ruby-ivar">@object</span>
688
+ 117: <span class="ruby-keyword kw">end</span>
689
+ </pre>
690
+ </div>
691
+ </div>
692
+ </div>
693
+
694
+ <div id="method-M000028" class="method-detail">
695
+ <a name="M000028"></a>
696
+
697
+ <div class="method-heading">
698
+ <a href="#M000028" class="method-signature">
699
+ <span class="method-name">not</span><span class="method-args">()</span>
700
+ </a>
701
+ </div>
702
+
703
+ <div class="method-description">
704
+ <p><a class="source-toggle" href="#"
705
+ onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
706
+ <div class="method-source-code" id="M000028-source">
707
+ <pre>
708
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 55</span>
709
+ 55: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">not</span>
710
+ 56: <span class="ruby-constant">ShouldNot</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@object</span>)
711
+ 57: <span class="ruby-keyword kw">end</span>
712
+ </pre>
713
+ </div>
714
+ </div>
715
+ </div>
716
+
717
+ <div id="method-M000053" class="method-detail">
718
+ <a name="M000053"></a>
719
+
720
+ <div class="method-heading">
721
+ <a href="#M000053" class="method-signature">
722
+ <span class="method-name">output</span><span class="method-args">(expected, to = STDOUT)</span>
723
+ </a>
724
+ </div>
725
+
726
+ <div class="method-description">
727
+ <p>
728
+ Captures output from the IO given as the second argument (STDIN by default)
729
+ and matches it against a String or Regexp given as the first argument.
730
+ </p>
731
+ <p><a class="source-toggle" href="#"
732
+ onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
733
+ <div class="method-source-code" id="M000053-source">
734
+ <pre>
735
+ <span class="ruby-comment cmt"># File lib/test/spec/should-output.rb, line 9</span>
736
+ 9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">output</span>(<span class="ruby-identifier">expected</span>, <span class="ruby-identifier">to</span> = <span class="ruby-constant">STDOUT</span>)
737
+ 10: <span class="ruby-comment cmt"># Store the old stream</span>
738
+ 11: <span class="ruby-identifier">old_to</span> = <span class="ruby-identifier">to</span>.<span class="ruby-identifier">dup</span>
739
+ 12:
740
+ 13: <span class="ruby-comment cmt"># Obtain a filehandle to replace (works with Readline)</span>
741
+ 14: <span class="ruby-identifier">to</span>.<span class="ruby-identifier">reopen</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-node">&quot;/tmp/should_output_#{$$}&quot;</span>, <span class="ruby-value str">&quot;w+&quot;</span>)
742
+ 15:
743
+ 16: <span class="ruby-comment cmt"># Execute</span>
744
+ 17: <span class="ruby-ivar">@object</span>.<span class="ruby-identifier">call</span>
745
+ 18:
746
+ 19: <span class="ruby-comment cmt"># Restore</span>
747
+ 20: <span class="ruby-identifier">out</span> = <span class="ruby-identifier">to</span>.<span class="ruby-identifier">dup</span>
748
+ 21: <span class="ruby-identifier">to</span>.<span class="ruby-identifier">reopen</span> <span class="ruby-identifier">old_to</span>
749
+ 22:
750
+ 23: <span class="ruby-comment cmt"># Grab the data</span>
751
+ 24: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">rewind</span>
752
+ 25: <span class="ruby-identifier">output</span> = <span class="ruby-identifier">out</span>.<span class="ruby-identifier">read</span>
753
+ 26:
754
+ 27: <span class="ruby-comment cmt"># Match up</span>
755
+ 28: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">expected</span>
756
+ 29: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Regexp</span>
757
+ 30: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">should</span>.<span class="ruby-identifier">match</span> <span class="ruby-identifier">expected</span>
758
+ 31: <span class="ruby-keyword kw">else</span>
759
+ 32: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">should</span>.<span class="ruby-identifier">equal</span> <span class="ruby-identifier">expected</span>
760
+ 33: <span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt"># case expected</span>
761
+ 34:
762
+ 35: <span class="ruby-comment cmt"># Clean up</span>
763
+ 36: <span class="ruby-keyword kw">ensure</span>
764
+ 37: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">close</span>
765
+ 38:
766
+ 39: <span class="ruby-comment cmt"># STDIO redirection will break else</span>
767
+ 40: <span class="ruby-keyword kw">begin</span>
768
+ 41: <span class="ruby-identifier">to</span>.<span class="ruby-identifier">seek</span> <span class="ruby-value">0</span>, <span class="ruby-constant">IO</span><span class="ruby-operator">::</span><span class="ruby-constant">SEEK_END</span>
769
+ 42: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ESPIPE</span>
770
+ 43: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EPIPE</span>
771
+ 44: <span class="ruby-keyword kw">end</span>
772
+ 45:
773
+ 46: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_f</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">path</span>
774
+ 47: <span class="ruby-keyword kw">end</span>
775
+ </pre>
776
+ </div>
777
+ </div>
778
+ </div>
779
+
780
+ <div id="method-M000041" class="method-detail">
781
+ <a name="M000041"></a>
782
+
783
+ <div class="method-heading">
784
+ <a href="#M000041" class="method-signature">
785
+ <span class="method-name">respond_to</span><span class="method-args">(method)</span>
786
+ </a>
787
+ </div>
788
+
789
+ <div class="method-description">
790
+ <p><a class="source-toggle" href="#"
791
+ onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
792
+ <div class="method-source-code" id="M000041-source">
793
+ <pre>
794
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 102</span>
795
+ 102: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">respond_to</span>(<span class="ruby-identifier">method</span>)
796
+ 103: <span class="ruby-identifier">assert_respond_to</span> <span class="ruby-ivar">@object</span>, <span class="ruby-identifier">method</span>
797
+ 104: <span class="ruby-keyword kw">end</span>
798
+ </pre>
799
+ </div>
800
+ </div>
801
+ </div>
802
+
803
+ <div id="method-M000029" class="method-detail">
804
+ <a name="M000029"></a>
805
+
806
+ <div class="method-heading">
807
+ <a href="#M000029" class="method-signature">
808
+ <span class="method-name">satisfy</span><span class="method-args">() {|@object| ...}</span>
809
+ </a>
810
+ </div>
811
+
812
+ <div class="method-description">
813
+ <p><a class="source-toggle" href="#"
814
+ onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
815
+ <div class="method-source-code" id="M000029-source">
816
+ <pre>
817
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 60</span>
818
+ 60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">satisfy</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
819
+ 61: <span class="ruby-identifier">assert_block</span>(<span class="ruby-value str">&quot;satisfy block failed.&quot;</span>) {
820
+ 62: <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@object</span>
821
+ 63: }
822
+ 64: <span class="ruby-keyword kw">end</span>
823
+ </pre>
824
+ </div>
825
+ </div>
826
+ </div>
827
+
828
+ <div id="method-M000043" class="method-detail">
829
+ <a name="M000043"></a>
830
+
831
+ <div class="method-heading">
832
+ <a href="#M000043" class="method-signature">
833
+ <span class="method-name">throw</span><span class="method-args">(*args)</span>
834
+ </a>
835
+ </div>
836
+
837
+ <div class="method-description">
838
+ <p><a class="source-toggle" href="#"
839
+ onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
840
+ <div class="method-source-code" id="M000043-source">
841
+ <pre>
842
+ <span class="ruby-comment cmt"># File lib/test/spec.rb, line 111</span>
843
+ 111: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">throw</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
844
+ 112: <span class="ruby-identifier">assert_throws</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-ivar">@object</span>)
845
+ 113: <span class="ruby-keyword kw">end</span>
846
+ </pre>
847
+ </div>
848
+ </div>
849
+ </div>
850
+
851
+
852
+ </div>
853
+
854
+
855
+ </div>
856
+
857
+
858
+ <div id="validator-badges">
859
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
860
+ </div>
861
+
862
+ </body>
863
+ </html>