ariete 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/.rspec +2 -0
- data/.travis.yml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +31 -0
- data/{LICENSE → LICENSE.txt} +1 -1
- data/README.md +56 -55
- data/Rakefile +4 -16
- data/ariete.gemspec +23 -0
- data/lib/ariete.rb +6 -26
- data/lib/ariete/version.rb +3 -0
- data/spec/ariete_spec.rb +37 -0
- data/spec/spec_helper.rb +2 -0
- metadata +70 -80
- data/CHANGELOG.md +0 -7
- data/CHANGELOG_jp.md +0 -7
- data/README_jp.md +0 -74
- data/doc/Ariete.html +0 -230
- data/doc/CaptureStdTest.html +0 -254
- data/doc/LICENSE.html +0 -105
- data/doc/Rakefile.html +0 -106
- data/doc/created.rid +0 -5
- data/doc/images/add.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +0 -82
- data/doc/js/darkfish.js +0 -153
- data/doc/js/jquery.js +0 -18
- data/doc/js/navigation.js +0 -142
- data/doc/js/search.js +0 -94
- data/doc/js/search_index.js +0 -1
- data/doc/js/searcher.js +0 -228
- data/doc/rdoc.css +0 -543
- data/doc/table_of_contents.html +0 -69
- data/test/tb_capture_std.rb +0 -24
data/CHANGELOG.md
DELETED
data/CHANGELOG_jp.md
DELETED
data/README_jp.md
DELETED
@@ -1,74 +0,0 @@
|
|
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 "ariete"
|
12
|
-
require_relative "klass"
|
13
|
-
|
14
|
-
class KlassTest < Test::Unit::TestCase
|
15
|
-
include Ariete
|
16
|
-
|
17
|
-
def test_stdout
|
18
|
-
result = capture_stdout {Klass.output_out("Ariete")}
|
19
|
-
assert_equal("Ariete is a kind of rabbit.", result)
|
20
|
-
end
|
21
|
-
|
22
|
-
def test_stderr
|
23
|
-
result = capture_stderr {Klass.output_err("Ariete")}
|
24
|
-
assert_equal("Ariete means 'Lop' in Italian.", result)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
## 動作環境
|
29
|
-
|
30
|
-
以下の環境で開発およびテストをしている。
|
31
|
-
|
32
|
-
- Linux(openSUSE 12.2)・Mac OS X 10.8.2
|
33
|
-
- Ruby 1.9.3
|
34
|
-
|
35
|
-
## 構成
|
36
|
-
|
37
|
-
- **bin**
|
38
|
-
- **doc** :: rdocによるドキュメント
|
39
|
-
- **lib**
|
40
|
-
- **ariete.rb** :: モジュール本体
|
41
|
-
- **LICENSE**
|
42
|
-
- **Rakefile** :: gemパッケージ生成用のRakefile
|
43
|
-
- **README.md**
|
44
|
-
- **README_jp.md**
|
45
|
-
- **test** :: ユニットテスト
|
46
|
-
- **tb_capture_std.rb** :: ariete.rbのためのユニットテスト
|
47
|
-
|
48
|
-
## インストール
|
49
|
-
|
50
|
-
ariete-x.y.z.gemファイル(x、y、zはバージョン番号)をダウンロードし、以下のコマンドを入力してインストールする。
|
51
|
-
|
52
|
-
`$ sudo gem install ariete-x.y.z.gem`
|
53
|
-
|
54
|
-
または、RubyGems.orgからgemコマンドを使ってインストールすることもできる。
|
55
|
-
|
56
|
-
`$ sudo gem install ariete`
|
57
|
-
|
58
|
-
## サンプルコード
|
59
|
-
|
60
|
-
tb_capture_std.rbがサンプルコードを兼ねている。
|
61
|
-
|
62
|
-
## APIドキュメント
|
63
|
-
|
64
|
-
[http://quellencode.org/ariete-doc/](http://quellencode.org/ariete-doc/ "")を参照
|
65
|
-
|
66
|
-
## ライセンス
|
67
|
-
|
68
|
-
本ソフトウェアは、MIT Licenseのもとで配布されている。詳細はLICENSEファイルに記している。
|
69
|
-
|
70
|
-
## 作者について
|
71
|
-
|
72
|
-
Moza USANE
|
73
|
-
[http://blog.quellencode.org/](http://blog.quellencode.org/ "")
|
74
|
-
mozamimy@quellencode.org
|
data/doc/Ariete.html
DELETED
@@ -1,230 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
-
|
7
|
-
<title>module Ariete - RDoc Documentation</title>
|
8
|
-
|
9
|
-
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
-
|
11
|
-
<script type="text/javascript">
|
12
|
-
var rdoc_rel_prefix = "./";
|
13
|
-
</script>
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
16
|
-
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
17
|
-
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
18
|
-
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
19
|
-
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
20
|
-
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
21
|
-
|
22
|
-
|
23
|
-
<body id="top" class="module">
|
24
|
-
<nav id="metadata">
|
25
|
-
<nav id="home-section" class="section">
|
26
|
-
<h3 class="section-header">
|
27
|
-
<a href="./index.html">Home</a>
|
28
|
-
<a href="./table_of_contents.html#classes">Classes</a>
|
29
|
-
<a href="./table_of_contents.html#methods">Methods</a>
|
30
|
-
</h3>
|
31
|
-
</nav>
|
32
|
-
|
33
|
-
|
34
|
-
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
-
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<h3 class="section-header">
|
37
|
-
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
-
</h3>
|
40
|
-
</form>
|
41
|
-
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
-
</nav>
|
44
|
-
|
45
|
-
|
46
|
-
<div id="file-metadata">
|
47
|
-
<nav id="file-list-section" class="section">
|
48
|
-
<h3 class="section-header">Defined In</h3>
|
49
|
-
<ul>
|
50
|
-
<li>lib/ariete.rb
|
51
|
-
</ul>
|
52
|
-
</nav>
|
53
|
-
|
54
|
-
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<div id="class-metadata">
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
<!-- Method Quickref -->
|
62
|
-
<nav id="method-list-section" class="section">
|
63
|
-
<h3 class="section-header">Methods</h3>
|
64
|
-
|
65
|
-
<ul class="link-list">
|
66
|
-
|
67
|
-
<li><a href="#method-i-capture_stderr">#capture_stderr</a>
|
68
|
-
|
69
|
-
<li><a href="#method-i-capture_stdout">#capture_stdout</a>
|
70
|
-
|
71
|
-
</ul>
|
72
|
-
</nav>
|
73
|
-
|
74
|
-
</div>
|
75
|
-
|
76
|
-
<div id="project-metadata">
|
77
|
-
<nav id="fileindex-section" class="section project-section">
|
78
|
-
<h3 class="section-header">Pages</h3>
|
79
|
-
|
80
|
-
<ul>
|
81
|
-
|
82
|
-
<li class="file"><a href="./LICENSE.html">LICENSE</a>
|
83
|
-
|
84
|
-
<li class="file"><a href="./Rakefile.html">Rakefile</a>
|
85
|
-
|
86
|
-
</ul>
|
87
|
-
</nav>
|
88
|
-
|
89
|
-
<nav id="classindex-section" class="section project-section">
|
90
|
-
<h3 class="section-header">Class and Module Index</h3>
|
91
|
-
|
92
|
-
<ul class="link-list">
|
93
|
-
|
94
|
-
<li><a href="./Ariete.html">Ariete</a>
|
95
|
-
|
96
|
-
<li><a href="./CaptureStdTest.html">CaptureStdTest</a>
|
97
|
-
|
98
|
-
</ul>
|
99
|
-
</nav>
|
100
|
-
|
101
|
-
</div>
|
102
|
-
</nav>
|
103
|
-
|
104
|
-
<div id="documentation">
|
105
|
-
<h1 class="module">module Ariete</h1>
|
106
|
-
|
107
|
-
<div id="description" class="description">
|
108
|
-
|
109
|
-
<p><a href="Ariete.html">Ariete</a> STDOUT & STDERR Capture Module</p>
|
110
|
-
<dl class="rdoc-list note-list"><dt>Author
|
111
|
-
<dd>
|
112
|
-
<p>Moza USANE (<a
|
113
|
-
href="mailto:mozamimy@quellencode.org">mozamimy@quellencode.org</a>)</p>
|
114
|
-
</dd><dt>Copyright
|
115
|
-
<dd>
|
116
|
-
<p>Copyright © 2012 Moza USANE</p>
|
117
|
-
</dd><dt>License
|
118
|
-
<dd>
|
119
|
-
<p>MIT License (see the <a href="LICENSE.html">LICENSE</a> file)</p>
|
120
|
-
</dd></dl>
|
121
|
-
|
122
|
-
</div><!-- description -->
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
<!-- Methods -->
|
137
|
-
|
138
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
139
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
140
|
-
|
141
|
-
|
142
|
-
<div id="method-i-capture_stderr" class="method-detail ">
|
143
|
-
|
144
|
-
<div class="method-heading">
|
145
|
-
<span class="method-name">capture_stderr</span><span
|
146
|
-
class="method-args">()</span>
|
147
|
-
<span class="method-click-advice">click to toggle source</span>
|
148
|
-
</div>
|
149
|
-
|
150
|
-
|
151
|
-
<div class="method-description">
|
152
|
-
|
153
|
-
<p>Capture STDERR’s output and return as String.</p>
|
154
|
-
|
155
|
-
<h4 id="method-i-capture_stderr-label-Args">Args</h4>
|
156
|
-
<dl class="rdoc-list note-list"><dt>&block
|
157
|
-
<dd>
|
158
|
-
<p>a block that you want to capture</p>
|
159
|
-
</dd></dl>
|
160
|
-
|
161
|
-
<h4 id="method-i-capture_stderr-label-Return">Return</h4>
|
162
|
-
|
163
|
-
<p>Captured string</p>
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
<div class="method-source-code" id="capture_stderr-source">
|
168
|
-
<pre><span class="ruby-comment"># File lib/ariete.rb, line 27</span>
|
169
|
-
</pre>
|
170
|
-
</div><!-- capture_stderr-source -->
|
171
|
-
|
172
|
-
</div>
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
</div><!-- capture_stderr-method -->
|
178
|
-
|
179
|
-
|
180
|
-
<div id="method-i-capture_stdout" class="method-detail ">
|
181
|
-
|
182
|
-
<div class="method-heading">
|
183
|
-
<span class="method-name">capture_stdout</span><span
|
184
|
-
class="method-args">()</span>
|
185
|
-
<span class="method-click-advice">click to toggle source</span>
|
186
|
-
</div>
|
187
|
-
|
188
|
-
|
189
|
-
<div class="method-description">
|
190
|
-
|
191
|
-
<p>Capture STDOUT’s output and return as String.</p>
|
192
|
-
|
193
|
-
<h4 id="method-i-capture_stdout-label-Args">Args</h4>
|
194
|
-
<dl class="rdoc-list note-list"><dt>&block
|
195
|
-
<dd>
|
196
|
-
<p>a block that you want to capture</p>
|
197
|
-
</dd></dl>
|
198
|
-
|
199
|
-
<h4 id="method-i-capture_stdout-label-Return">Return</h4>
|
200
|
-
|
201
|
-
<p>Captured string</p>
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
<div class="method-source-code" id="capture_stdout-source">
|
206
|
-
<pre><span class="ruby-comment"># File lib/ariete.rb, line 19</span>
|
207
|
-
</pre>
|
208
|
-
</div><!-- capture_stdout-source -->
|
209
|
-
|
210
|
-
</div>
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
</div><!-- capture_stdout-method -->
|
216
|
-
|
217
|
-
|
218
|
-
</section><!-- public-instance-method-details -->
|
219
|
-
|
220
|
-
</section><!-- 5Buntitled-5D -->
|
221
|
-
|
222
|
-
</div><!-- documentation -->
|
223
|
-
|
224
|
-
|
225
|
-
<footer id="validator-badges">
|
226
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
227
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
228
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
229
|
-
</footer>
|
230
|
-
|
data/doc/CaptureStdTest.html
DELETED
@@ -1,254 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
-
|
7
|
-
<title>class CaptureStdTest - RDoc Documentation</title>
|
8
|
-
|
9
|
-
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
-
|
11
|
-
<script type="text/javascript">
|
12
|
-
var rdoc_rel_prefix = "./";
|
13
|
-
</script>
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
16
|
-
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
17
|
-
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
18
|
-
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
19
|
-
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
20
|
-
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
21
|
-
|
22
|
-
|
23
|
-
<body id="top" class="class">
|
24
|
-
<nav id="metadata">
|
25
|
-
<nav id="home-section" class="section">
|
26
|
-
<h3 class="section-header">
|
27
|
-
<a href="./index.html">Home</a>
|
28
|
-
<a href="./table_of_contents.html#classes">Classes</a>
|
29
|
-
<a href="./table_of_contents.html#methods">Methods</a>
|
30
|
-
</h3>
|
31
|
-
</nav>
|
32
|
-
|
33
|
-
|
34
|
-
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
-
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<h3 class="section-header">
|
37
|
-
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
-
</h3>
|
40
|
-
</form>
|
41
|
-
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
-
</nav>
|
44
|
-
|
45
|
-
|
46
|
-
<div id="file-metadata">
|
47
|
-
<nav id="file-list-section" class="section">
|
48
|
-
<h3 class="section-header">Defined In</h3>
|
49
|
-
<ul>
|
50
|
-
<li>test/tb_capture_std.rb
|
51
|
-
</ul>
|
52
|
-
</nav>
|
53
|
-
|
54
|
-
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<div id="class-metadata">
|
58
|
-
|
59
|
-
<nav id="parent-class-section" class="section">
|
60
|
-
<h3 class="section-header">Parent</h3>
|
61
|
-
|
62
|
-
<p class="link">Test::Unit::TestCase
|
63
|
-
|
64
|
-
</nav>
|
65
|
-
|
66
|
-
<!-- Included Modules -->
|
67
|
-
<nav id="includes-section" class="section">
|
68
|
-
<h3 class="section-header">Included Modules</h3>
|
69
|
-
|
70
|
-
<ul class="link-list">
|
71
|
-
|
72
|
-
|
73
|
-
<li><a class="include" href="Ariete.html">Ariete</a>
|
74
|
-
|
75
|
-
|
76
|
-
</ul>
|
77
|
-
</nav>
|
78
|
-
|
79
|
-
<!-- Method Quickref -->
|
80
|
-
<nav id="method-list-section" class="section">
|
81
|
-
<h3 class="section-header">Methods</h3>
|
82
|
-
|
83
|
-
<ul class="link-list">
|
84
|
-
|
85
|
-
<li><a href="#method-i-output">#output</a>
|
86
|
-
|
87
|
-
<li><a href="#method-i-test_stderr">#test_stderr</a>
|
88
|
-
|
89
|
-
<li><a href="#method-i-test_stdout">#test_stdout</a>
|
90
|
-
|
91
|
-
</ul>
|
92
|
-
</nav>
|
93
|
-
|
94
|
-
</div>
|
95
|
-
|
96
|
-
<div id="project-metadata">
|
97
|
-
<nav id="fileindex-section" class="section project-section">
|
98
|
-
<h3 class="section-header">Pages</h3>
|
99
|
-
|
100
|
-
<ul>
|
101
|
-
|
102
|
-
<li class="file"><a href="./LICENSE.html">LICENSE</a>
|
103
|
-
|
104
|
-
<li class="file"><a href="./Rakefile.html">Rakefile</a>
|
105
|
-
|
106
|
-
</ul>
|
107
|
-
</nav>
|
108
|
-
|
109
|
-
<nav id="classindex-section" class="section project-section">
|
110
|
-
<h3 class="section-header">Class and Module Index</h3>
|
111
|
-
|
112
|
-
<ul class="link-list">
|
113
|
-
|
114
|
-
<li><a href="./Ariete.html">Ariete</a>
|
115
|
-
|
116
|
-
<li><a href="./CaptureStdTest.html">CaptureStdTest</a>
|
117
|
-
|
118
|
-
</ul>
|
119
|
-
</nav>
|
120
|
-
|
121
|
-
</div>
|
122
|
-
</nav>
|
123
|
-
|
124
|
-
<div id="documentation">
|
125
|
-
<h1 class="class">class CaptureStdTest</h1>
|
126
|
-
|
127
|
-
<div id="description" class="description">
|
128
|
-
|
129
|
-
</div><!-- description -->
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
<!-- Methods -->
|
144
|
-
|
145
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
146
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
147
|
-
|
148
|
-
|
149
|
-
<div id="method-i-output" class="method-detail ">
|
150
|
-
|
151
|
-
<div class="method-heading">
|
152
|
-
<span class="method-name">output</span><span
|
153
|
-
class="method-args">(str)</span>
|
154
|
-
<span class="method-click-advice">click to toggle source</span>
|
155
|
-
</div>
|
156
|
-
|
157
|
-
|
158
|
-
<div class="method-description">
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
<div class="method-source-code" id="output-source">
|
165
|
-
<pre><span class="ruby-comment"># File test/tb_capture_std.rb, line 18</span>
|
166
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">output</span>(<span class="ruby-identifier">str</span>)
|
167
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{str} is a kind of rabbit."</span>
|
168
|
-
<span class="ruby-identifier">warn</span> <span class="ruby-node">"#{str} means 'Lop' in Italian"</span>
|
169
|
-
<span class="ruby-keyword">end</span></pre>
|
170
|
-
</div><!-- output-source -->
|
171
|
-
|
172
|
-
</div>
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
</div><!-- output-method -->
|
178
|
-
|
179
|
-
|
180
|
-
<div id="method-i-test_stderr" class="method-detail ">
|
181
|
-
|
182
|
-
<div class="method-heading">
|
183
|
-
<span class="method-name">test_stderr</span><span
|
184
|
-
class="method-args">()</span>
|
185
|
-
<span class="method-click-advice">click to toggle source</span>
|
186
|
-
</div>
|
187
|
-
|
188
|
-
|
189
|
-
<div class="method-description">
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
<div class="method-source-code" id="test_stderr-source">
|
196
|
-
<pre><span class="ruby-comment"># File test/tb_capture_std.rb, line 13</span>
|
197
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_stderr</span>
|
198
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">capture_stderr</span> {<span class="ruby-identifier">output</span>(<span class="ruby-string">"Ariete"</span>)}
|
199
|
-
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-string">"Ariete means 'Lop' in Italian\n"</span>, <span class="ruby-identifier">result</span>)
|
200
|
-
<span class="ruby-keyword">end</span></pre>
|
201
|
-
</div><!-- test_stderr-source -->
|
202
|
-
|
203
|
-
</div>
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
</div><!-- test_stderr-method -->
|
209
|
-
|
210
|
-
|
211
|
-
<div id="method-i-test_stdout" class="method-detail ">
|
212
|
-
|
213
|
-
<div class="method-heading">
|
214
|
-
<span class="method-name">test_stdout</span><span
|
215
|
-
class="method-args">()</span>
|
216
|
-
<span class="method-click-advice">click to toggle source</span>
|
217
|
-
</div>
|
218
|
-
|
219
|
-
|
220
|
-
<div class="method-description">
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
<div class="method-source-code" id="test_stdout-source">
|
227
|
-
<pre><span class="ruby-comment"># File test/tb_capture_std.rb, line 8</span>
|
228
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">test_stdout</span>
|
229
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">capture_stdout</span> {<span class="ruby-identifier">output</span>(<span class="ruby-string">"Ariete"</span>)}
|
230
|
-
<span class="ruby-identifier">assert_equal</span>(<span class="ruby-string">"Ariete is a kind of rabbit.\n"</span>, <span class="ruby-identifier">result</span>)
|
231
|
-
<span class="ruby-keyword">end</span></pre>
|
232
|
-
</div><!-- test_stdout-source -->
|
233
|
-
|
234
|
-
</div>
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
</div><!-- test_stdout-method -->
|
240
|
-
|
241
|
-
|
242
|
-
</section><!-- public-instance-method-details -->
|
243
|
-
|
244
|
-
</section><!-- 5Buntitled-5D -->
|
245
|
-
|
246
|
-
</div><!-- documentation -->
|
247
|
-
|
248
|
-
|
249
|
-
<footer id="validator-badges">
|
250
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
251
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
252
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
253
|
-
</footer>
|
254
|
-
|