ariete 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ Ariete $stdout & $stderr Capture Module
2
+ =======================================
3
+
4
+ ## Ver 0.0.1
5
+
6
+ - 2012/12/10
7
+ - First release
@@ -0,0 +1,7 @@
1
+ Ariete $stdout & $stderr Capture Module
2
+ =======================================
3
+
4
+ ## Ver 0.0.1
5
+
6
+ - 2012/12/10
7
+ - ファーストリリース。
data/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2012 Moza USANE
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,73 @@
1
+ Ariete $stdout & $stderr Capture Module
2
+ =======================================
3
+
4
+ ## Introduction
5
+
6
+ Ariete $stdout & $stderr Capture Module is a module that captures $stdout($stderr) and return as String. Ariete is useful on unit test.
7
+
8
+ **usage**
9
+
10
+ require "test/unit"
11
+ require_relative "klass"
12
+
13
+ class KlassTest < Test::Unit::TestCase
14
+ include Ariete
15
+
16
+ def test_stdout
17
+ result = capture_stdout {Klass.output_out("Ariete")}
18
+ assert_equal("Ariete is a kind of rabbit.", result)
19
+ end
20
+
21
+ def test_stderr
22
+ result = capture_stderr {Klass.output_err("Ariete")}
23
+ assert_equal("Ariete means 'Lop' in Italian.", result)
24
+ end
25
+ end
26
+
27
+ ## Operation Environment
28
+
29
+ We checked good operation within following environment.
30
+
31
+ - Linux(openSUSE 12.2)・Mac OS X 10.8.2
32
+ - Ruby 1.9.3
33
+
34
+ ## Architectonics
35
+
36
+ - **bin**
37
+ - **doc** :: Documents generated by rdoc
38
+ - **lib**
39
+ - **ariete.rb** :: Main unit of Ariete
40
+ - **LICENSE**
41
+ - **Rakefile** :: Rakefile that is used to generate gem file
42
+ - **README.md**
43
+ - **README_jp.md**
44
+ - **test** :: Unit tests
45
+ - **tb_capture_std.rb** :: Unit test for Ariete
46
+
47
+ ## Install
48
+
49
+ Download ariete-x.y.z.gem, then execute following command to install Ariete.
50
+
51
+ `$ sudo gem install ariete-x.y.z.gem`
52
+
53
+ On the other hand, you can install from RubyGems.org to use following command.
54
+
55
+ `$ sudo gem install ariete`
56
+
57
+ ## Sample code
58
+
59
+ See tb_capture_std.rb file. It is an unit test code, and it doubles with sample code.
60
+
61
+ ## API document
62
+
63
+ See following website: [http://quellencode.org/ariete-doc/](http://quellencode.org/ariete-doc/ "")
64
+
65
+ ## License
66
+
67
+ Hakto is distributed with MIT License. See the LICENSE file to read the detail of license.
68
+
69
+ ## About Author
70
+
71
+ Moza USANE
72
+ [http://blog.quellencode.org/](http://blog.quellencode.org/ "")
73
+ mozamimy@quellencode.org
@@ -0,0 +1,73 @@
1
+ Ariete $stdout & $stderr Capture Module
2
+ =======================================
3
+
4
+ ## イントロダクション
5
+
6
+ Ariete $stdout & $stderr Capture Moduleは、標準出力または標準エラー出力をキャプチャし、文字列として取得するためのモジュールである。主にユニットテストで使用することを想定している。
7
+
8
+ **usage**
9
+
10
+ require "test/unit"
11
+ require_relative "klass"
12
+
13
+ class KlassTest < Test::Unit::TestCase
14
+ include Ariete
15
+
16
+ def test_stdout
17
+ result = capture_stdout {Klass.output_out("Ariete")}
18
+ assert_equal("Ariete is a kind of rabbit.", result)
19
+ end
20
+
21
+ def test_stderr
22
+ result = capture_stderr {Klass.output_err("Ariete")}
23
+ assert_equal("Ariete means 'Lop' in Italian.", result)
24
+ end
25
+ end
26
+
27
+ ## 動作環境
28
+
29
+ 以下の環境で開発およびテストをしている。
30
+
31
+ - Linux(openSUSE 12.2)・Mac OS X 10.8.2
32
+ - Ruby 1.9.3
33
+
34
+ ## 構成
35
+
36
+ - **bin**
37
+ - **doc** :: rdocによるドキュメント
38
+ - **lib**
39
+ - **ariete.rb** :: モジュール本体
40
+ - **LICENSE**
41
+ - **Rakefile** :: gemパッケージ生成用のRakefile
42
+ - **README.md**
43
+ - **README_jp.md**
44
+ - **test** :: ユニットテスト
45
+ - **tb_capture_std.rb** :: ariete.rbのためのユニットテスト
46
+
47
+ ## インストール
48
+
49
+ ariete-x.y.z.gemファイル(x、y、zはバージョン番号)をダウンロードし、以下のコマンドを入力してインストールする。
50
+
51
+ `$ sudo gem install ariete-x.y.z.gem`
52
+
53
+ または、RubyGems.orgからgemコマンドを使ってインストールすることもできる。
54
+
55
+ `$ sudo gem install ariete`
56
+
57
+ ## サンプルコード
58
+
59
+ tb_capture_std.rbがサンプルコードを兼ねている。
60
+
61
+ ## APIドキュメント
62
+
63
+ [http://quellencode.org/ariete-doc/](http://quellencode.org/ariete-doc/ "")を参照
64
+
65
+ ## ライセンス
66
+
67
+ 本ソフトウェアは、MIT Licenseのもとで配布されている。詳細はLICENSEファイルに記している。
68
+
69
+ ## 作者について
70
+
71
+ Moza USANE
72
+ [http://blog.quellencode.org/](http://blog.quellencode.org/ "")
73
+ mozamimy@quellencode.org
@@ -0,0 +1,18 @@
1
+ require "rake/gempackagetask"
2
+
3
+ spec = Gem::Specification.new do |s|
4
+ s.name = "ariete"
5
+ s.summary = "Ariete $stdout & $stderr Capture Module."
6
+ s.description = File.read(File.join(File.dirname(__FILE__), "README.md"))
7
+ s.version = "0.0.1"
8
+ s.author = "Moza USANE"
9
+ s.email = "mozamimy@quellencode.org"
10
+ s.homepage = "http://blog.quellencode.org/"
11
+ s.platform = Gem::Platform::RUBY
12
+ s.required_ruby_version = ">=1.9"
13
+ s.files = Dir["**/**"]
14
+ s.test_files = Dir["test/test*.rb"]
15
+ s.has_rdoc = true
16
+ end
17
+
18
+ Rake::GemPackageTask.new(spec).define
@@ -0,0 +1,248 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7
+
8
+ <title>Module: Ariete</title>
9
+
10
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
+
17
+ </head>
18
+ <body id="top" class="module">
19
+
20
+ <div id="metadata">
21
+ <div id="home-metadata">
22
+ <div id="home-section" class="section">
23
+ <h3 class="section-header">
24
+ <a href="./index.html">Home</a>
25
+ <a href="./index.html#classes">Classes</a>
26
+ <a href="./index.html#methods">Methods</a>
27
+ </h3>
28
+ </div>
29
+ </div>
30
+
31
+ <div id="file-metadata">
32
+ <div id="file-list-section" class="section">
33
+ <h3 class="section-header">In Files</h3>
34
+ <div class="section-body">
35
+ <ul>
36
+
37
+ <li><a href="./lib/ariete_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
+ class="thickbox" title="lib/ariete.rb">lib/ariete.rb</a></li>
39
+
40
+ </ul>
41
+ </div>
42
+ </div>
43
+
44
+
45
+ </div>
46
+
47
+ <div id="class-metadata">
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+ <!-- Method Quickref -->
56
+ <div id="method-list-section" class="section">
57
+ <h3 class="section-header">Methods</h3>
58
+ <ul class="link-list">
59
+
60
+ <li><a href="#method-i-capture_stderr">#capture_stderr</a></li>
61
+
62
+ <li><a href="#method-i-capture_stdout">#capture_stdout</a></li>
63
+
64
+ </ul>
65
+ </div>
66
+
67
+
68
+
69
+ </div>
70
+
71
+ <div id="project-metadata">
72
+
73
+
74
+ <div id="fileindex-section" class="section project-section">
75
+ <h3 class="section-header">Files</h3>
76
+ <ul>
77
+
78
+ <li class="file"><a href="./LICENSE.html">LICENSE</a></li>
79
+
80
+ <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
81
+
82
+ </ul>
83
+ </div>
84
+
85
+
86
+ <div id="classindex-section" class="section project-section">
87
+ <h3 class="section-header">Class/Module Index
88
+ <span class="search-toggle"><img src="./images/find.png"
89
+ height="16" width="16" alt="[+]"
90
+ title="show/hide quicksearch" /></span></h3>
91
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
92
+ <fieldset>
93
+ <legend>Quicksearch</legend>
94
+ <input type="text" name="quicksearch" value=""
95
+ class="quicksearch-field" />
96
+ </fieldset>
97
+ </form>
98
+
99
+ <ul class="link-list">
100
+
101
+ <li><a href="./Ariete.html">Ariete</a></li>
102
+
103
+ <li><a href="./CaptureStdTest.html">CaptureStdTest</a></li>
104
+
105
+ </ul>
106
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
107
+ </div>
108
+
109
+
110
+ </div>
111
+ </div>
112
+
113
+ <div id="documentation">
114
+ <h1 class="module">Ariete</h1>
115
+
116
+ <div id="description" class="description">
117
+
118
+ <p><a href="Ariete.html">Ariete</a> $stdout &amp; $stderr Capture Module</p>
119
+ <table class="rdoc-list"><tr><td class="rdoc-term"><p>Author</p></td>
120
+ <td>
121
+ <p>Moza USANE (<a
122
+ href="mailto:mozamimy@quellencode.org">mozamimy@quellencode.org</a>)</p>
123
+ </td></tr><tr><td class="rdoc-term"><p>Copyright</p></td>
124
+ <td>
125
+ <p>Copyright © 2012 Moza USANE</p>
126
+ </td></tr><tr><td class="rdoc-term"><p>License</p></td>
127
+ <td>
128
+ <p>MIT License (see the <a href="LICENSE.html">LICENSE</a> file)</p>
129
+ </td></tr></table>
130
+
131
+ </div><!-- description -->
132
+
133
+
134
+
135
+
136
+ <div id="5Buntitled-5D" class="documentation-section">
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <!-- Methods -->
146
+
147
+ <div id="public-instance-method-details" class="method-section section">
148
+ <h3 class="section-header">Public Instance Methods</h3>
149
+
150
+
151
+ <div id="capture_stderr-method" class="method-detail ">
152
+ <a name="method-i-capture_stderr"></a>
153
+
154
+
155
+ <div class="method-heading">
156
+ <span class="method-name">capture_stderr</span><span
157
+ class="method-args"></span>
158
+ <span class="method-click-advice">click to toggle source</span>
159
+ </div>
160
+
161
+
162
+ <div class="method-description">
163
+
164
+ <p>Capture $stderr’s output and return as String.</p>
165
+
166
+ <h4>Args</h4>
167
+ <table class="rdoc-list"><tr><td class="rdoc-term"><p>&amp;block </p></td>
168
+ <td>
169
+ <p>a block that you want to capture</p>
170
+ </td></tr></table>
171
+
172
+ <h4>Return</h4>
173
+
174
+ <p>Captured string</p>
175
+
176
+
177
+
178
+ <div class="method-source-code" id="capture_stderr-source">
179
+ <pre>
180
+ <span class="ruby-comment"># File lib/ariete.rb, line 27</span>
181
+ </pre>
182
+ </div><!-- capture_stderr-source -->
183
+
184
+ </div>
185
+
186
+
187
+
188
+
189
+ </div><!-- capture_stderr-method -->
190
+
191
+
192
+ <div id="capture_stdout-method" class="method-detail ">
193
+ <a name="method-i-capture_stdout"></a>
194
+
195
+
196
+ <div class="method-heading">
197
+ <span class="method-name">capture_stdout</span><span
198
+ class="method-args"></span>
199
+ <span class="method-click-advice">click to toggle source</span>
200
+ </div>
201
+
202
+
203
+ <div class="method-description">
204
+
205
+ <p>Capture $stdout’s output and return as String.</p>
206
+
207
+ <h4>Args</h4>
208
+ <table class="rdoc-list"><tr><td class="rdoc-term"><p>&amp;block </p></td>
209
+ <td>
210
+ <p>a block that you want to capture</p>
211
+ </td></tr></table>
212
+
213
+ <h4>Return</h4>
214
+
215
+ <p>Captured string</p>
216
+
217
+
218
+
219
+ <div class="method-source-code" id="capture_stdout-source">
220
+ <pre>
221
+ <span class="ruby-comment"># File lib/ariete.rb, line 19</span>
222
+ </pre>
223
+ </div><!-- capture_stdout-source -->
224
+
225
+ </div>
226
+
227
+
228
+
229
+
230
+ </div><!-- capture_stdout-method -->
231
+
232
+
233
+ </div><!-- public-instance-method-details -->
234
+
235
+ </div><!-- 5Buntitled-5D -->
236
+
237
+
238
+ </div><!-- documentation -->
239
+
240
+ <div id="validator-badges">
241
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
242
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
243
+ Rdoc Generator</a> 2</small>.</p>
244
+ </div>
245
+
246
+ </body>
247
+ </html>
248
+
@@ -0,0 +1,277 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: CaptureStdTest</title>
9
+
10
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>
16
+
17
+ </head>
18
+ <body id="top" class="class">
19
+
20
+ <div id="metadata">
21
+ <div id="home-metadata">
22
+ <div id="home-section" class="section">
23
+ <h3 class="section-header">
24
+ <a href="./index.html">Home</a>
25
+ <a href="./index.html#classes">Classes</a>
26
+ <a href="./index.html#methods">Methods</a>
27
+ </h3>
28
+ </div>
29
+ </div>
30
+
31
+ <div id="file-metadata">
32
+ <div id="file-list-section" class="section">
33
+ <h3 class="section-header">In Files</h3>
34
+ <div class="section-body">
35
+ <ul>
36
+
37
+ <li><a href="./test/tb_capture_std_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
+ class="thickbox" title="test/tb_capture_std.rb">test/tb_capture_std.rb</a></li>
39
+
40
+ </ul>
41
+ </div>
42
+ </div>
43
+
44
+
45
+ </div>
46
+
47
+ <div id="class-metadata">
48
+
49
+ <!-- Parent Class -->
50
+ <div id="parent-class-section" class="section">
51
+ <h3 class="section-header">Parent</h3>
52
+
53
+ <p class="link">Test::Unit::TestCase</p>
54
+
55
+ </div>
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+ <!-- Method Quickref -->
64
+ <div id="method-list-section" class="section">
65
+ <h3 class="section-header">Methods</h3>
66
+ <ul class="link-list">
67
+
68
+ <li><a href="#method-i-output">#output</a></li>
69
+
70
+ <li><a href="#method-i-test_stderr">#test_stderr</a></li>
71
+
72
+ <li><a href="#method-i-test_stdout">#test_stdout</a></li>
73
+
74
+ </ul>
75
+ </div>
76
+
77
+
78
+
79
+ <!-- Included Modules -->
80
+ <div id="includes-section" class="section">
81
+ <h3 class="section-header">Included Modules</h3>
82
+ <ul class="link-list">
83
+
84
+
85
+ <li><a class="include" href="Ariete.html">Ariete</a></li>
86
+
87
+
88
+ </ul>
89
+ </div>
90
+
91
+ </div>
92
+
93
+ <div id="project-metadata">
94
+
95
+
96
+ <div id="fileindex-section" class="section project-section">
97
+ <h3 class="section-header">Files</h3>
98
+ <ul>
99
+
100
+ <li class="file"><a href="./LICENSE.html">LICENSE</a></li>
101
+
102
+ <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
103
+
104
+ </ul>
105
+ </div>
106
+
107
+
108
+ <div id="classindex-section" class="section project-section">
109
+ <h3 class="section-header">Class/Module Index
110
+ <span class="search-toggle"><img src="./images/find.png"
111
+ height="16" width="16" alt="[+]"
112
+ title="show/hide quicksearch" /></span></h3>
113
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
114
+ <fieldset>
115
+ <legend>Quicksearch</legend>
116
+ <input type="text" name="quicksearch" value=""
117
+ class="quicksearch-field" />
118
+ </fieldset>
119
+ </form>
120
+
121
+ <ul class="link-list">
122
+
123
+ <li><a href="./Ariete.html">Ariete</a></li>
124
+
125
+ <li><a href="./CaptureStdTest.html">CaptureStdTest</a></li>
126
+
127
+ </ul>
128
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
129
+ </div>
130
+
131
+
132
+ </div>
133
+ </div>
134
+
135
+ <div id="documentation">
136
+ <h1 class="class">CaptureStdTest</h1>
137
+
138
+ <div id="description" class="description">
139
+
140
+ </div><!-- description -->
141
+
142
+
143
+
144
+
145
+ <div id="5Buntitled-5D" class="documentation-section">
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+ <!-- Methods -->
155
+
156
+ <div id="public-instance-method-details" class="method-section section">
157
+ <h3 class="section-header">Public Instance Methods</h3>
158
+
159
+
160
+ <div id="output-method" class="method-detail ">
161
+ <a name="method-i-output"></a>
162
+
163
+
164
+ <div class="method-heading">
165
+ <span class="method-name">output</span><span
166
+ class="method-args">(str)</span>
167
+ <span class="method-click-advice">click to toggle source</span>
168
+ </div>
169
+
170
+
171
+ <div class="method-description">
172
+
173
+
174
+
175
+
176
+
177
+ <div class="method-source-code" id="output-source">
178
+ <pre>
179
+ <span class="ruby-comment"># File test/tb_capture_std.rb, line 18</span>
180
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">output</span>(<span class="ruby-identifier">str</span>)
181
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{str} is a kind of rabbit.&quot;</span>
182
+ <span class="ruby-identifier">warn</span> <span class="ruby-node">&quot;#{str} means 'Lop' in Italian&quot;</span>
183
+ <span class="ruby-keyword">end</span></pre>
184
+ </div><!-- output-source -->
185
+
186
+ </div>
187
+
188
+
189
+
190
+
191
+ </div><!-- output-method -->
192
+
193
+
194
+ <div id="test_stderr-method" class="method-detail ">
195
+ <a name="method-i-test_stderr"></a>
196
+
197
+
198
+ <div class="method-heading">
199
+ <span class="method-name">test_stderr</span><span
200
+ class="method-args">()</span>
201
+ <span class="method-click-advice">click to toggle source</span>
202
+ </div>
203
+
204
+
205
+ <div class="method-description">
206
+
207
+
208
+
209
+
210
+
211
+ <div class="method-source-code" id="test_stderr-source">
212
+ <pre>
213
+ <span class="ruby-comment"># File test/tb_capture_std.rb, line 13</span>
214
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">test_stderr</span>
215
+ <span class="ruby-identifier">result</span> = <span class="ruby-identifier">capture_stderr</span> {<span class="ruby-identifier">output</span>(<span class="ruby-string">&quot;Ariete&quot;</span>)}
216
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-string">&quot;Ariete means 'Lop' in Italian\n&quot;</span>, <span class="ruby-identifier">result</span>)
217
+ <span class="ruby-keyword">end</span></pre>
218
+ </div><!-- test_stderr-source -->
219
+
220
+ </div>
221
+
222
+
223
+
224
+
225
+ </div><!-- test_stderr-method -->
226
+
227
+
228
+ <div id="test_stdout-method" class="method-detail ">
229
+ <a name="method-i-test_stdout"></a>
230
+
231
+
232
+ <div class="method-heading">
233
+ <span class="method-name">test_stdout</span><span
234
+ class="method-args">()</span>
235
+ <span class="method-click-advice">click to toggle source</span>
236
+ </div>
237
+
238
+
239
+ <div class="method-description">
240
+
241
+
242
+
243
+
244
+
245
+ <div class="method-source-code" id="test_stdout-source">
246
+ <pre>
247
+ <span class="ruby-comment"># File test/tb_capture_std.rb, line 8</span>
248
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">test_stdout</span>
249
+ <span class="ruby-identifier">result</span> = <span class="ruby-identifier">capture_stdout</span> {<span class="ruby-identifier">output</span>(<span class="ruby-string">&quot;Ariete&quot;</span>)}
250
+ <span class="ruby-identifier">assert_equal</span>(<span class="ruby-string">&quot;Ariete is a kind of rabbit.\n&quot;</span>, <span class="ruby-identifier">result</span>)
251
+ <span class="ruby-keyword">end</span></pre>
252
+ </div><!-- test_stdout-source -->
253
+
254
+ </div>
255
+
256
+
257
+
258
+
259
+ </div><!-- test_stdout-method -->
260
+
261
+
262
+ </div><!-- public-instance-method-details -->
263
+
264
+ </div><!-- 5Buntitled-5D -->
265
+
266
+
267
+ </div><!-- documentation -->
268
+
269
+ <div id="validator-badges">
270
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
271
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
272
+ Rdoc Generator</a> 2</small>.</p>
273
+ </div>
274
+
275
+ </body>
276
+ </html>
277
+