detest 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CREDITS +4 -11
- data/bin/detest +2 -10
- data/lib/detest/inochi.rb +9 -9
- data/lib/detest/long.rb +3 -2
- data/man/man1/detest.1 +3429 -0
- metadata +11 -12
- data/man.html +0 -1298
- data/man/man1/detest.1.gz +0 -0
data/CREDITS
CHANGED
@@ -1,21 +1,14 @@
|
|
1
|
-
|
2
|
-
## AUTHORS
|
3
|
-
%#----------------------------------------------------------------------------
|
1
|
+
== AUTHORS
|
4
2
|
|
5
3
|
Suraj N. Kurapati
|
6
4
|
|
7
|
-
|
8
|
-
## CREDITS
|
9
|
-
%#----------------------------------------------------------------------------
|
5
|
+
=== Credits
|
10
6
|
|
11
7
|
François Beausoleil,
|
12
8
|
Gavin Sinclair,
|
13
9
|
Iñaki Baz Castillo,
|
14
10
|
Sean O'Halpin
|
15
11
|
|
16
|
-
|
17
|
-
## LICENSE
|
18
|
-
%#----------------------------------------------------------------------------
|
12
|
+
=== License
|
19
13
|
|
20
|
-
|
21
|
-
%< "LICENSE"
|
14
|
+
%< 'LICENSE'
|
data/bin/detest
CHANGED
@@ -3,16 +3,8 @@
|
|
3
3
|
require 'detest'
|
4
4
|
|
5
5
|
if ARGV.delete('-h') or ARGV.delete('--help')
|
6
|
-
|
7
|
-
|
8
|
-
unless system 'man', '-M', man_path, '-a', 'detest'
|
9
|
-
# try to display HTML version of help manual
|
10
|
-
man_html = man_path + '.html'
|
11
|
-
unless %w[$BROWSER open start].any? {|b| system "#{b} #{man_html}" }
|
12
|
-
# no luck; direct user to project website
|
13
|
-
puts "See #{Detest::WEBSITE}"
|
14
|
-
end
|
15
|
-
end
|
6
|
+
system 'man', '-M', File.join(Detest::INSTDIR, 'man'), 'detest' or
|
7
|
+
warn "Could not display the help manual.\nSee #{Detest::WEBSITE} instead."
|
16
8
|
exit
|
17
9
|
elsif ARGV.delete('-v') or ARGV.delete('--version')
|
18
10
|
puts Detest::VERSION
|
data/lib/detest/inochi.rb
CHANGED
@@ -18,12 +18,12 @@ module Detest
|
|
18
18
|
##
|
19
19
|
# Number of this release of this project.
|
20
20
|
#
|
21
|
-
VERSION = '3.1.
|
21
|
+
VERSION = '3.1.1'
|
22
22
|
|
23
23
|
##
|
24
24
|
# Date of this release of this project.
|
25
25
|
#
|
26
|
-
RELDATE = '2010-
|
26
|
+
RELDATE = '2010-08-08'
|
27
27
|
|
28
28
|
##
|
29
29
|
# Description of this release of this project.
|
@@ -44,14 +44,14 @@ module Detest
|
|
44
44
|
#
|
45
45
|
# RUNTIME = {
|
46
46
|
# # this project needs exactly version 1.2.3 of the "an_example" gem
|
47
|
-
#
|
47
|
+
# 'an_example' => [ '1.2.3' ],
|
48
48
|
#
|
49
49
|
# # this project needs at least version 1.2 (but not
|
50
50
|
# # version 1.2.4 or newer) of the "another_example" gem
|
51
|
-
#
|
51
|
+
# 'another_example' => [ '>= 1.2' , '< 1.2.4' ],
|
52
52
|
#
|
53
53
|
# # this project needs any version of the "yet_another_example" gem
|
54
|
-
#
|
54
|
+
# 'yet_another_example' => [],
|
55
55
|
# }
|
56
56
|
#
|
57
57
|
RUNTIME = {}
|
@@ -63,22 +63,22 @@ module Detest
|
|
63
63
|
#
|
64
64
|
# DEVTIME = {
|
65
65
|
# # this project needs exactly version 1.2.3 of the "an_example" gem
|
66
|
-
#
|
66
|
+
# 'an_example' => [ '1.2.3' ],
|
67
67
|
#
|
68
68
|
# # this project needs at least version 1.2 (but not
|
69
69
|
# # version 1.2.4 or newer) of the "another_example" gem
|
70
|
-
#
|
70
|
+
# 'another_example' => [ '>= 1.2' , '< 1.2.4' ],
|
71
71
|
#
|
72
72
|
# # this project needs any version of the "yet_another_example" gem
|
73
73
|
# "yet_another_example" => [],
|
74
74
|
# }
|
75
75
|
#
|
76
76
|
DEVTIME = {
|
77
|
-
'inochi' => [ '>=
|
77
|
+
'inochi' => [ '>= 5.0.0', '< 6' ],
|
78
78
|
}
|
79
79
|
|
80
80
|
# establish gem version dependencies
|
81
|
-
if respond_to? :gem
|
81
|
+
if respond_to? :gem, true
|
82
82
|
[RUNTIME, DEVTIME].each do |deps|
|
83
83
|
deps.each do |gem_name, gem_version|
|
84
84
|
begin
|
data/lib/detest/long.rb
CHANGED
@@ -4,13 +4,14 @@ require 'detest'
|
|
4
4
|
|
5
5
|
module Detest
|
6
6
|
short_to_long = {
|
7
|
-
'D' => 'Describe',
|
8
7
|
'T' => 'True',
|
9
8
|
'F' => 'False',
|
9
|
+
'N' => 'Nil',
|
10
10
|
'E' => 'Error',
|
11
11
|
'C' => 'Catch',
|
12
|
-
'S' => 'Share',
|
13
12
|
'I' => 'Inform',
|
13
|
+
'S' => 'Share',
|
14
|
+
'D' => 'Describe',
|
14
15
|
}
|
15
16
|
|
16
17
|
short_to_long.each do |src, dst|
|
data/man/man1/detest.1
ADDED
@@ -0,0 +1,3429 @@
|
|
1
|
+
'\" t
|
2
|
+
.\" Title: detest
|
3
|
+
.\" Author: [see the "AUTHORS" section]
|
4
|
+
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
5
|
+
.\" Date: 08/08/2010
|
6
|
+
.\" Manual: \ \&
|
7
|
+
.\" Source: \ \& 3.1.1
|
8
|
+
.\" Language: English
|
9
|
+
.\"
|
10
|
+
.TH "DETEST" "1" "08/08/2010" "\ \& 3\&.1\&.1" "\ \&"
|
11
|
+
.\" -----------------------------------------------------------------
|
12
|
+
.\" * set default formatting
|
13
|
+
.\" -----------------------------------------------------------------
|
14
|
+
.\" disable hyphenation
|
15
|
+
.nh
|
16
|
+
.\" disable justification (adjust text to left margin only)
|
17
|
+
.ad l
|
18
|
+
.\" -----------------------------------------------------------------
|
19
|
+
.\" * MAIN CONTENT STARTS HERE *
|
20
|
+
.\" -----------------------------------------------------------------
|
21
|
+
.SH "NAME"
|
22
|
+
detest \- Assertion testing library for Ruby
|
23
|
+
.SH "SYNOPSIS"
|
24
|
+
.sp
|
25
|
+
\fBdetest\fR [\fIOPTIONS\fR] (\fIFILE\fR|\fIGLOB\fR)\&...
|
26
|
+
.SS "Command"
|
27
|
+
.sp
|
28
|
+
Loads the given \fIFILE\fR paths and paths matched by the given \fIGLOB\fR patterns into Ruby, then executes all tests defined therein, and finally terminates with an exit status reflecting the number of errors and assertion failures (up to a maximum of 255 to avoid 8\-bit unsigned integer overflow) that occurred\&.
|
29
|
+
.SS "Options"
|
30
|
+
.PP
|
31
|
+
\fB\-d\fR, \fB\-\-debug\fR
|
32
|
+
.RS 4
|
33
|
+
Launch interactive debugger upon assertion failures\&.
|
34
|
+
.RE
|
35
|
+
.PP
|
36
|
+
\fB\-h\fR, \fB\-\-help\fR
|
37
|
+
.RS 4
|
38
|
+
Display this manual and exit\&.
|
39
|
+
.RE
|
40
|
+
.PP
|
41
|
+
\fB\-v\fR, \fB\-\-version\fR
|
42
|
+
.RS 4
|
43
|
+
Print version number and exit\&.
|
44
|
+
.RE
|
45
|
+
.SS "Examples"
|
46
|
+
.sp
|
47
|
+
Execute the foo_test\&.rb and bar_test\&.rb files in the current directory:
|
48
|
+
.sp
|
49
|
+
.nf
|
50
|
+
detest foo_test\&.rb bar_test\&.rb
|
51
|
+
.fi
|
52
|
+
.sp
|
53
|
+
Execute all *_test\&.rb files inside the test/ directory:
|
54
|
+
.sp
|
55
|
+
.nf
|
56
|
+
detest \'test/*_test\&.rb\'
|
57
|
+
.fi
|
58
|
+
.sp
|
59
|
+
Execute all *_test\&.rb files inside or beneath the test/ directory:
|
60
|
+
.sp
|
61
|
+
.nf
|
62
|
+
detest \'test/**/*_test\&.rb\'
|
63
|
+
.fi
|
64
|
+
.sp
|
65
|
+
Execute all foo_test\&.rb and bar_test\&.rb files inside or beneath the test/ directory:
|
66
|
+
.sp
|
67
|
+
.nf
|
68
|
+
detest \'test/**/{foo,bar}_test\&.rb\'
|
69
|
+
.fi
|
70
|
+
.SH "DESCRIPTION"
|
71
|
+
.sp
|
72
|
+
Detest is an assertion testing library for the Ruby programming language\&. It features a simple assertion vocabulary, instant debuggability of failures, and flexibility in composing tests\&.
|
73
|
+
.SS "Features"
|
74
|
+
.sp
|
75
|
+
.RS 4
|
76
|
+
.ie n \{\
|
77
|
+
\h'-04'\(bu\h'+03'\c
|
78
|
+
.\}
|
79
|
+
.el \{\
|
80
|
+
.sp -1
|
81
|
+
.IP \(bu 2.3
|
82
|
+
.\}
|
83
|
+
Only 8 mnemonic method names to remember:
|
84
|
+
.sp
|
85
|
+
\fBT\fRrue,
|
86
|
+
\fBF\fRalse,
|
87
|
+
\fBN\fRil,
|
88
|
+
\fBE\fRrror,
|
89
|
+
\fBC\fRatch,
|
90
|
+
\fBS\fRhare,
|
91
|
+
\fBI\fRnform,
|
92
|
+
\fBD\fRescribe
|
93
|
+
.RE
|
94
|
+
.sp
|
95
|
+
.RS 4
|
96
|
+
.ie n \{\
|
97
|
+
\h'-04'\(bu\h'+03'\c
|
98
|
+
.\}
|
99
|
+
.el \{\
|
100
|
+
.sp -1
|
101
|
+
.IP \(bu 2.3
|
102
|
+
.\}
|
103
|
+
Lets you debug assertion failures interactively\&.
|
104
|
+
.RE
|
105
|
+
.sp
|
106
|
+
.RS 4
|
107
|
+
.ie n \{\
|
108
|
+
\h'-04'\(bu\h'+03'\c
|
109
|
+
.\}
|
110
|
+
.el \{\
|
111
|
+
.sp -1
|
112
|
+
.IP \(bu 2.3
|
113
|
+
.\}
|
114
|
+
Lets you nest tests, assertions, and execution hooks\&.
|
115
|
+
.RE
|
116
|
+
.sp
|
117
|
+
.RS 4
|
118
|
+
.ie n \{\
|
119
|
+
\h'-04'\(bu\h'+03'\c
|
120
|
+
.\}
|
121
|
+
.el \{\
|
122
|
+
.sp -1
|
123
|
+
.IP \(bu 2.3
|
124
|
+
.\}
|
125
|
+
Maintains a detailed report of assertion failures\&.
|
126
|
+
.RE
|
127
|
+
.sp
|
128
|
+
.RS 4
|
129
|
+
.ie n \{\
|
130
|
+
\h'-04'\(bu\h'+03'\c
|
131
|
+
.\}
|
132
|
+
.el \{\
|
133
|
+
.sp -1
|
134
|
+
.IP \(bu 2.3
|
135
|
+
.\}
|
136
|
+
Implemented in 436 lines of pure Ruby\&.
|
137
|
+
.RE
|
138
|
+
.SS "Resources"
|
139
|
+
.PP
|
140
|
+
Project website
|
141
|
+
.RS 4
|
142
|
+
|
143
|
+
http://snk\&.tuxfamily\&.org/lib/detest/
|
144
|
+
.RE
|
145
|
+
.PP
|
146
|
+
Announcements feed
|
147
|
+
.RS 4
|
148
|
+
|
149
|
+
http://snk\&.tuxfamily\&.org/lib/detest/ann\&.xml
|
150
|
+
.RE
|
151
|
+
.PP
|
152
|
+
API documentation
|
153
|
+
.RS 4
|
154
|
+
|
155
|
+
http://snk\&.tuxfamily\&.org/lib/detest/api/
|
156
|
+
.RE
|
157
|
+
.PP
|
158
|
+
Source code (browse online, download, or checkout)
|
159
|
+
.RS 4
|
160
|
+
|
161
|
+
http://github\&.com/sunaku/detest
|
162
|
+
.RE
|
163
|
+
.PP
|
164
|
+
Issue tracker (report bugs, request features, get help)
|
165
|
+
.RS 4
|
166
|
+
|
167
|
+
http://github\&.com/sunaku/detest/issues
|
168
|
+
.RE
|
169
|
+
.SH "INSTALL"
|
170
|
+
.SS "Prerequisites"
|
171
|
+
.sp
|
172
|
+
.RS 4
|
173
|
+
.ie n \{\
|
174
|
+
\h'-04'\(bu\h'+03'\c
|
175
|
+
.\}
|
176
|
+
.el \{\
|
177
|
+
.sp -1
|
178
|
+
.IP \(bu 2.3
|
179
|
+
.\}
|
180
|
+
|
181
|
+
[Ruby]
|
182
|
+
1\&.8\&.6 or newer\&.
|
183
|
+
.RE
|
184
|
+
.sp
|
185
|
+
.RS 4
|
186
|
+
.ie n \{\
|
187
|
+
\h'-04'\(bu\h'+03'\c
|
188
|
+
.\}
|
189
|
+
.el \{\
|
190
|
+
.sp -1
|
191
|
+
.IP \(bu 2.3
|
192
|
+
.\}
|
193
|
+
|
194
|
+
[RubyGems]
|
195
|
+
1\&.3\&.6 or newer\&.
|
196
|
+
.RE
|
197
|
+
.SS "Installing"
|
198
|
+
.sp
|
199
|
+
.if n \{\
|
200
|
+
.RS 4
|
201
|
+
.\}
|
202
|
+
.nf
|
203
|
+
gem install detest
|
204
|
+
.fi
|
205
|
+
.if n \{\
|
206
|
+
.RE
|
207
|
+
.\}
|
208
|
+
.SS "Upgrading"
|
209
|
+
.sp
|
210
|
+
.if n \{\
|
211
|
+
.RS 4
|
212
|
+
.\}
|
213
|
+
.nf
|
214
|
+
gem update detest
|
215
|
+
.fi
|
216
|
+
.if n \{\
|
217
|
+
.RE
|
218
|
+
.\}
|
219
|
+
.SS "Removing"
|
220
|
+
.sp
|
221
|
+
.if n \{\
|
222
|
+
.RS 4
|
223
|
+
.\}
|
224
|
+
.nf
|
225
|
+
gem uninstall detest
|
226
|
+
.fi
|
227
|
+
.if n \{\
|
228
|
+
.RE
|
229
|
+
.\}
|
230
|
+
.SH "USAGE"
|
231
|
+
.sp
|
232
|
+
Begin by loading the Detest library into your program:
|
233
|
+
.sp
|
234
|
+
.if n \{\
|
235
|
+
.RS 4
|
236
|
+
.\}
|
237
|
+
.nf
|
238
|
+
require \'rubygems\' # might not be necessary; see HACKING
|
239
|
+
require \'detest\'
|
240
|
+
.fi
|
241
|
+
.if n \{\
|
242
|
+
.RE
|
243
|
+
.\}
|
244
|
+
.sp
|
245
|
+
You can now call methods on the Detest module directly:
|
246
|
+
.sp
|
247
|
+
.if n \{\
|
248
|
+
.RS 4
|
249
|
+
.\}
|
250
|
+
.nf
|
251
|
+
Detest\&.D \'hello\' do # D() is a class method
|
252
|
+
puts \'world\'
|
253
|
+
end
|
254
|
+
.fi
|
255
|
+
.if n \{\
|
256
|
+
.RE
|
257
|
+
.\}
|
258
|
+
.sp
|
259
|
+
or mix\-in the module and call its methods implicitly:
|
260
|
+
.sp
|
261
|
+
.if n \{\
|
262
|
+
.RS 4
|
263
|
+
.\}
|
264
|
+
.nf
|
265
|
+
include Detest # mix\-in the Detest module
|
266
|
+
|
267
|
+
D \'hello\' do # D() is an instance method
|
268
|
+
puts \'world\'
|
269
|
+
end
|
270
|
+
.fi
|
271
|
+
.if n \{\
|
272
|
+
.RE
|
273
|
+
.\}
|
274
|
+
.sp
|
275
|
+
You can configure the test execution process using:
|
276
|
+
.sp
|
277
|
+
.if n \{\
|
278
|
+
.RS 4
|
279
|
+
.\}
|
280
|
+
.nf
|
281
|
+
Detest\&.debug = true # or false
|
282
|
+
.fi
|
283
|
+
.if n \{\
|
284
|
+
.RE
|
285
|
+
.\}
|
286
|
+
.sp
|
287
|
+
You can execute all tests defined thus far, in depth\-first search (DFS) order, using:
|
288
|
+
.sp
|
289
|
+
.if n \{\
|
290
|
+
.RS 4
|
291
|
+
.\}
|
292
|
+
.nf
|
293
|
+
Detest\&.start
|
294
|
+
.fi
|
295
|
+
.if n \{\
|
296
|
+
.RE
|
297
|
+
.\}
|
298
|
+
.sp
|
299
|
+
You can stop the execution at any time using:
|
300
|
+
.sp
|
301
|
+
.if n \{\
|
302
|
+
.RS 4
|
303
|
+
.\}
|
304
|
+
.nf
|
305
|
+
Detest\&.stop
|
306
|
+
.fi
|
307
|
+
.if n \{\
|
308
|
+
.RE
|
309
|
+
.\}
|
310
|
+
.sp
|
311
|
+
You can view the results of execution using:
|
312
|
+
.sp
|
313
|
+
.if n \{\
|
314
|
+
.RS 4
|
315
|
+
.\}
|
316
|
+
.nf
|
317
|
+
puts Detest\&.trace\&.to_yaml
|
318
|
+
puts Detest\&.stats\&.to_yaml
|
319
|
+
.fi
|
320
|
+
.if n \{\
|
321
|
+
.RE
|
322
|
+
.\}
|
323
|
+
.sp
|
324
|
+
You can clear the results of execution using:
|
325
|
+
.sp
|
326
|
+
.if n \{\
|
327
|
+
.RS 4
|
328
|
+
.\}
|
329
|
+
.nf
|
330
|
+
Detest\&.reset
|
331
|
+
.fi
|
332
|
+
.if n \{\
|
333
|
+
.RE
|
334
|
+
.\}
|
335
|
+
.sp
|
336
|
+
You can mix\-in the Detest module into your program and execute all tests defined by your program before it terminates by simply adding the following line at the top of your program:
|
337
|
+
.sp
|
338
|
+
.if n \{\
|
339
|
+
.RS 4
|
340
|
+
.\}
|
341
|
+
.nf
|
342
|
+
require \'detest/auto\'
|
343
|
+
.fi
|
344
|
+
.if n \{\
|
345
|
+
.RE
|
346
|
+
.\}
|
347
|
+
.sp
|
348
|
+
See the API documentation for more information and examples\&.
|
349
|
+
.SH "TESTS"
|
350
|
+
.SS "Defining tests"
|
351
|
+
.sp
|
352
|
+
The D() method creates a new \fBtest\fR, which is analagous to the \fBdescribe\fR keyword in [RSpec] and also to the concept of a "test case" in [xUnit]\&.
|
353
|
+
.sp
|
354
|
+
.if n \{\
|
355
|
+
.RS 4
|
356
|
+
.\}
|
357
|
+
.nf
|
358
|
+
D "outer test" do
|
359
|
+
# assertions and logic here
|
360
|
+
|
361
|
+
D "inner test" do
|
362
|
+
# more assertions and logic here
|
363
|
+
end
|
364
|
+
end
|
365
|
+
.fi
|
366
|
+
.if n \{\
|
367
|
+
.RE
|
368
|
+
.\}
|
369
|
+
.sp
|
370
|
+
A test may contain nested tests, as illustrated above\&.
|
371
|
+
.SS "Insulating tests"
|
372
|
+
.sp
|
373
|
+
The D!() method defines a new test that is explicitly insulated from the tests that contain it and also from the top\-level Ruby environment\&. Root\-level calls to the D() method are insulated by default\&.
|
374
|
+
.sp
|
375
|
+
Inside an insulated test, you are free to mix\-in (using the \fBextend\fR keyword, not the \fBinclude\fR keyword) any modules your test logic needs\&. You can also define your own constants, methods, classes, and modules here\&.
|
376
|
+
.PP
|
377
|
+
\fBExample\ \&1.\ \&Insulated and uninsulated tests\fR
|
378
|
+
.sp
|
379
|
+
When the following test is run:
|
380
|
+
.sp
|
381
|
+
.if n \{\
|
382
|
+
.RS 4
|
383
|
+
.\}
|
384
|
+
.nf
|
385
|
+
require \'detest/auto\'
|
386
|
+
|
387
|
+
D "a root\-level test" do
|
388
|
+
@outside = 1
|
389
|
+
T { defined? @outside }
|
390
|
+
T { @outside == 1 }
|
391
|
+
|
392
|
+
D "an inner, non\-insulated test" do
|
393
|
+
T { defined? @outside }
|
394
|
+
T { @outside == 1 }
|
395
|
+
end
|
396
|
+
|
397
|
+
D! "an inner, insulated test" do
|
398
|
+
F { defined? @outside }
|
399
|
+
F { @outside == 1 }
|
400
|
+
|
401
|
+
@inside = 2
|
402
|
+
T { defined? @inside }
|
403
|
+
T { @inside == 2 }
|
404
|
+
end
|
405
|
+
|
406
|
+
F { defined? @inside }
|
407
|
+
F { @inside == 2 }
|
408
|
+
end
|
409
|
+
.fi
|
410
|
+
.if n \{\
|
411
|
+
.RE
|
412
|
+
.\}
|
413
|
+
.sp
|
414
|
+
Detest will output the following:
|
415
|
+
.sp
|
416
|
+
.if n \{\
|
417
|
+
.RS 4
|
418
|
+
.\}
|
419
|
+
.nf
|
420
|
+
\-\-\-
|
421
|
+
\- a root\-level test:
|
422
|
+
\- an inner, non\-insulated test:
|
423
|
+
\- an inner, insulated test:
|
424
|
+
\-\-\-
|
425
|
+
pass: 10
|
426
|
+
time: 0\&.009435692
|
427
|
+
.fi
|
428
|
+
.if n \{\
|
429
|
+
.RE
|
430
|
+
.\}
|
431
|
+
.SS "Sharing tests"
|
432
|
+
.TS
|
433
|
+
tab(:);
|
434
|
+
lt lt
|
435
|
+
lt lt
|
436
|
+
lt lt.
|
437
|
+
T{
|
438
|
+
.sp
|
439
|
+
S()
|
440
|
+
T}:T{
|
441
|
+
.sp
|
442
|
+
Mechanism for sharing code\&. It can be used in two ways:
|
443
|
+
|
444
|
+
.sp
|
445
|
+
.RS 4
|
446
|
+
.ie n \{\
|
447
|
+
\h'-04' 1.\h'+01'\c
|
448
|
+
.\}
|
449
|
+
.el \{\
|
450
|
+
.sp -1
|
451
|
+
.IP " 1." 4.2
|
452
|
+
.\}
|
453
|
+
When called with a block, it shares the given block (under a given identifier) for injection into other tests\&.
|
454
|
+
.RE
|
455
|
+
.sp
|
456
|
+
.RS 4
|
457
|
+
.ie n \{\
|
458
|
+
\h'-04' 2.\h'+01'\c
|
459
|
+
.\}
|
460
|
+
.el \{\
|
461
|
+
.sp -1
|
462
|
+
.IP " 2." 4.2
|
463
|
+
.\}
|
464
|
+
When called without a block, it injects a previously shared block (under a given identifier) into the environment where it is called\&.
|
465
|
+
.RE
|
466
|
+
T}
|
467
|
+
T{
|
468
|
+
.sp
|
469
|
+
S!()
|
470
|
+
T}:T{
|
471
|
+
.sp
|
472
|
+
Combination of the two uses of the S() method: it lets you simultaneously share a block of code while injecting it into the environment where that method is called\&.
|
473
|
+
T}
|
474
|
+
T{
|
475
|
+
.sp
|
476
|
+
S?()
|
477
|
+
T}:T{
|
478
|
+
.sp
|
479
|
+
Checks whether any code has been shared under a given identifier\&.
|
480
|
+
T}
|
481
|
+
.TE
|
482
|
+
.sp 1
|
483
|
+
.PP
|
484
|
+
\fBExample\ \&2.\ \&Sharing code between tests\fR
|
485
|
+
.sp
|
486
|
+
When the following test is run:
|
487
|
+
.sp
|
488
|
+
.if n \{\
|
489
|
+
.RS 4
|
490
|
+
.\}
|
491
|
+
.nf
|
492
|
+
require \'detest/auto\'
|
493
|
+
|
494
|
+
S :knowledge do
|
495
|
+
I \'Knowledge is power!\'
|
496
|
+
end
|
497
|
+
|
498
|
+
D \'Healer\' do
|
499
|
+
S :knowledge
|
500
|
+
end
|
501
|
+
|
502
|
+
D \'Warrior\' do
|
503
|
+
S! :strength do
|
504
|
+
I \'Strength is power!\'
|
505
|
+
end
|
506
|
+
end
|
507
|
+
|
508
|
+
D \'Wizard\' do
|
509
|
+
S :knowledge
|
510
|
+
S :strength
|
511
|
+
end
|
512
|
+
|
513
|
+
D \'King\' do
|
514
|
+
T { S? :knowledge }
|
515
|
+
T { S? :strength }
|
516
|
+
F { S? :power }
|
517
|
+
I \'Power is power!\'
|
518
|
+
end
|
519
|
+
.fi
|
520
|
+
.if n \{\
|
521
|
+
.RE
|
522
|
+
.\}
|
523
|
+
.sp
|
524
|
+
Detest will output the following:
|
525
|
+
.sp
|
526
|
+
.if n \{\
|
527
|
+
.RS 4
|
528
|
+
.\}
|
529
|
+
.nf
|
530
|
+
\-\-\-
|
531
|
+
\- Healer:
|
532
|
+
\- Knowledge is power!
|
533
|
+
\- Warrior:
|
534
|
+
\- Strength is power!
|
535
|
+
\- Wizard:
|
536
|
+
\- Knowledge is power!
|
537
|
+
\- Strength is power!
|
538
|
+
\- King:
|
539
|
+
\- Power is power!
|
540
|
+
\-\-\-
|
541
|
+
pass: 3
|
542
|
+
time: 0\&.007379665
|
543
|
+
.fi
|
544
|
+
.if n \{\
|
545
|
+
.RE
|
546
|
+
.\}
|
547
|
+
.SS "Logging information"
|
548
|
+
.TS
|
549
|
+
tab(:);
|
550
|
+
lt lt
|
551
|
+
lt lt.
|
552
|
+
T{
|
553
|
+
.sp
|
554
|
+
I()
|
555
|
+
T}:T{
|
556
|
+
.sp
|
557
|
+
Mechanism for inserting arbitrary Ruby objects into the test execution report\&. You can think of this method as being a way \fIto inform\fR someone\&.
|
558
|
+
T}
|
559
|
+
T{
|
560
|
+
.sp
|
561
|
+
I!()
|
562
|
+
T}:T{
|
563
|
+
.sp
|
564
|
+
Starts the interactive debugger at the location where it is called\&.
|
565
|
+
T}
|
566
|
+
.TE
|
567
|
+
.sp 1
|
568
|
+
.PP
|
569
|
+
\fBExample\ \&3.\ \&Logging information in the execution report\fR
|
570
|
+
.sp
|
571
|
+
When the following test is run:
|
572
|
+
.sp
|
573
|
+
.if n \{\
|
574
|
+
.RS 4
|
575
|
+
.\}
|
576
|
+
.nf
|
577
|
+
require \'detest/auto\'
|
578
|
+
|
579
|
+
D \'Wizard\' do
|
580
|
+
I \'Preparing spell to defeat mortal foes\&.\&.\&.\'
|
581
|
+
end
|
582
|
+
|
583
|
+
D \'Magician\' do
|
584
|
+
I \'Preparing rabbits to pull from hat\&.\&.\&.\', rand(15)
|
585
|
+
end
|
586
|
+
|
587
|
+
D \'Calculator\' do
|
588
|
+
I Math::PI, [1, 2, 3, [\'a\', \'b\', \'c\']], {:foo => \'bar!\'}
|
589
|
+
end
|
590
|
+
.fi
|
591
|
+
.if n \{\
|
592
|
+
.RE
|
593
|
+
.\}
|
594
|
+
.sp
|
595
|
+
Detest will output the following:
|
596
|
+
.sp
|
597
|
+
.if n \{\
|
598
|
+
.RS 4
|
599
|
+
.\}
|
600
|
+
.nf
|
601
|
+
\-\-\-
|
602
|
+
\- Wizard:
|
603
|
+
\- Preparing spell to defeat mortal foes\&.\&.\&.
|
604
|
+
\- Magician:
|
605
|
+
\- Preparing rabbits to pull from hat\&.\&.\&.
|
606
|
+
\- 6
|
607
|
+
\- Calculator:
|
608
|
+
\- 3\&.141592653589793
|
609
|
+
\- \- 1
|
610
|
+
\- 2
|
611
|
+
\- 3
|
612
|
+
\- \- a
|
613
|
+
\- b
|
614
|
+
\- c
|
615
|
+
\- foo: bar!
|
616
|
+
\-\-\-
|
617
|
+
time: 0\&.00284595
|
618
|
+
.fi
|
619
|
+
.if n \{\
|
620
|
+
.RE
|
621
|
+
.\}
|
622
|
+
.SS "Execution hooks"
|
623
|
+
.sp
|
624
|
+
A \fBhook\fR is a scheduled point of entry into the test execution process\&. The following \fBhook methods\fR allow you to register a block of code to execute when a hook occurs:
|
625
|
+
.TS
|
626
|
+
tab(:);
|
627
|
+
lt lt
|
628
|
+
lt lt
|
629
|
+
lt lt
|
630
|
+
lt lt.
|
631
|
+
T{
|
632
|
+
.sp
|
633
|
+
D\&.<()
|
634
|
+
T}:T{
|
635
|
+
.sp
|
636
|
+
Calls the given block \fIbefore each\fR child test\&.
|
637
|
+
T}
|
638
|
+
T{
|
639
|
+
.sp
|
640
|
+
D\&.>()
|
641
|
+
T}:T{
|
642
|
+
.sp
|
643
|
+
Calls the given block \fIafter each\fR child test\&.
|
644
|
+
T}
|
645
|
+
T{
|
646
|
+
.sp
|
647
|
+
D\&.<<()
|
648
|
+
T}:T{
|
649
|
+
.sp
|
650
|
+
Calls the given block \fIbefore all\fR child tests\&.
|
651
|
+
T}
|
652
|
+
T{
|
653
|
+
.sp
|
654
|
+
D\&.>>()
|
655
|
+
T}:T{
|
656
|
+
.sp
|
657
|
+
Calls the given block \fIafter all\fR child tests\&.
|
658
|
+
T}
|
659
|
+
.TE
|
660
|
+
.sp 1
|
661
|
+
.sp
|
662
|
+
A hook method can be called multiple times\&. Each additional call schedules more logic to be executed during the hook:
|
663
|
+
.sp
|
664
|
+
.if n \{\
|
665
|
+
.RS 4
|
666
|
+
.\}
|
667
|
+
.nf
|
668
|
+
D \&.< { puts "do something" }
|
669
|
+
D \&.< { puts "do something more!" }
|
670
|
+
.fi
|
671
|
+
.if n \{\
|
672
|
+
.RE
|
673
|
+
.\}
|
674
|
+
.PP
|
675
|
+
\fBExample\ \&4.\ \&Using hooks to perform before and after actions\fR
|
676
|
+
.sp
|
677
|
+
When the following test is run:
|
678
|
+
.sp
|
679
|
+
.if n \{\
|
680
|
+
.RS 4
|
681
|
+
.\}
|
682
|
+
.nf
|
683
|
+
require \'detest/auto\'
|
684
|
+
|
685
|
+
D "outer test" do
|
686
|
+
D \&.< { I "(outer hook) before each" }
|
687
|
+
D \&.> { I "(outer hook) after each" }
|
688
|
+
D \&.<< { I "(outer hook) before all" }
|
689
|
+
D \&.>> { I "(outer hook) after all" }
|
690
|
+
|
691
|
+
D "inner test 1" do
|
692
|
+
D \&.< { I "(inner hook) before each" }
|
693
|
+
D \&.> { I "(inner hook) after each" }
|
694
|
+
D \&.<< { I "(inner hook) before all" }
|
695
|
+
D \&.>> { I "(inner hook) after all" }
|
696
|
+
|
697
|
+
D "inner test 1\&.1" do
|
698
|
+
I "hello world"
|
699
|
+
end
|
700
|
+
end
|
701
|
+
|
702
|
+
D "inner test 2" do
|
703
|
+
I "goodbye world"
|
704
|
+
end
|
705
|
+
|
706
|
+
D \&.< { I "(outer hook) before each, again" }
|
707
|
+
D \&.> { I "(outer hook) after each, again" }
|
708
|
+
end
|
709
|
+
.fi
|
710
|
+
.if n \{\
|
711
|
+
.RE
|
712
|
+
.\}
|
713
|
+
.sp
|
714
|
+
Detest will output the following:
|
715
|
+
.sp
|
716
|
+
.if n \{\
|
717
|
+
.RS 4
|
718
|
+
.\}
|
719
|
+
.nf
|
720
|
+
\-\-\-
|
721
|
+
\- outer test:
|
722
|
+
\- (outer hook) before all
|
723
|
+
\- (outer hook) before each
|
724
|
+
\- (outer hook) before each, again
|
725
|
+
\- inner test 1:
|
726
|
+
\- (inner hook) before all
|
727
|
+
\- (inner hook) before each
|
728
|
+
\- inner test 1\&.1:
|
729
|
+
\- hello world
|
730
|
+
\- (inner hook) after each
|
731
|
+
\- (inner hook) after all
|
732
|
+
\- (outer hook) after each
|
733
|
+
\- (outer hook) after each, again
|
734
|
+
\- (outer hook) before each
|
735
|
+
\- (outer hook) before each, again
|
736
|
+
\- inner test 2:
|
737
|
+
\- goodbye world
|
738
|
+
\- (outer hook) after each
|
739
|
+
\- (outer hook) after each, again
|
740
|
+
\- (outer hook) after all
|
741
|
+
\-\-\-
|
742
|
+
time: 0\&.007706195
|
743
|
+
.fi
|
744
|
+
.if n \{\
|
745
|
+
.RE
|
746
|
+
.\}
|
747
|
+
.SH "ASSERTIONS"
|
748
|
+
.SS "Writing assertions"
|
749
|
+
.sp
|
750
|
+
The following methods accept a block parameter and assert something about the result of executing that block\&. They also accept an optional message, which is shown in their failure reports if they fail\&.
|
751
|
+
.TS
|
752
|
+
tab(:);
|
753
|
+
lt lt
|
754
|
+
lt lt
|
755
|
+
lt lt
|
756
|
+
lt lt
|
757
|
+
lt lt.
|
758
|
+
T{
|
759
|
+
.sp
|
760
|
+
T()
|
761
|
+
T}:T{
|
762
|
+
.sp
|
763
|
+
assert true (not nil and not false)
|
764
|
+
T}
|
765
|
+
T{
|
766
|
+
.sp
|
767
|
+
F()
|
768
|
+
T}:T{
|
769
|
+
.sp
|
770
|
+
assert not true (nil or false)
|
771
|
+
T}
|
772
|
+
T{
|
773
|
+
.sp
|
774
|
+
N()
|
775
|
+
T}:T{
|
776
|
+
.sp
|
777
|
+
assert that the value is nil
|
778
|
+
T}
|
779
|
+
T{
|
780
|
+
.sp
|
781
|
+
E()
|
782
|
+
T}:T{
|
783
|
+
.sp
|
784
|
+
assert that an execption is raised
|
785
|
+
T}
|
786
|
+
T{
|
787
|
+
.sp
|
788
|
+
C()
|
789
|
+
T}:T{
|
790
|
+
.sp
|
791
|
+
assert that a symbol is thrown
|
792
|
+
T}
|
793
|
+
.TE
|
794
|
+
.sp 1
|
795
|
+
.sp
|
796
|
+
For the T() and F() methods, you may alternatively pass the condition to be asserted as the first argument (instead of passing it as a block)\&. This might result in a more pleasing syntax, depending on your taste:
|
797
|
+
.sp
|
798
|
+
.if n \{\
|
799
|
+
.RS 4
|
800
|
+
.\}
|
801
|
+
.nf
|
802
|
+
D "Lottery" do
|
803
|
+
winning_ticket = rand()
|
804
|
+
|
805
|
+
D "My chances of winning" do
|
806
|
+
my_ticket = rand()
|
807
|
+
|
808
|
+
#
|
809
|
+
# Option 1: passing the condition as a block:
|
810
|
+
#
|
811
|
+
F("I won?! Dream on\&.") { my_ticket == winning_ticket }
|
812
|
+
|
813
|
+
#
|
814
|
+
# Option 2: passing the condition as an argument:
|
815
|
+
#
|
816
|
+
F my_ticket == winning_ticket, "I won?! Dream on\&."
|
817
|
+
|
818
|
+
end
|
819
|
+
end
|
820
|
+
.fi
|
821
|
+
.if n \{\
|
822
|
+
.RE
|
823
|
+
.\}
|
824
|
+
.SS "Negating assertions"
|
825
|
+
.sp
|
826
|
+
The following methods are the \fIopposite\fR of normal assertions\&.
|
827
|
+
.TS
|
828
|
+
tab(:);
|
829
|
+
lt lt
|
830
|
+
lt lt
|
831
|
+
lt lt
|
832
|
+
lt lt
|
833
|
+
lt lt.
|
834
|
+
T{
|
835
|
+
.sp
|
836
|
+
T!()
|
837
|
+
T}:T{
|
838
|
+
.sp
|
839
|
+
same as F()
|
840
|
+
T}
|
841
|
+
T{
|
842
|
+
.sp
|
843
|
+
F!()
|
844
|
+
T}:T{
|
845
|
+
.sp
|
846
|
+
same as T()
|
847
|
+
T}
|
848
|
+
T{
|
849
|
+
.sp
|
850
|
+
N!()
|
851
|
+
T}:T{
|
852
|
+
.sp
|
853
|
+
assert that value is not nil
|
854
|
+
T}
|
855
|
+
T{
|
856
|
+
.sp
|
857
|
+
E!()
|
858
|
+
T}:T{
|
859
|
+
.sp
|
860
|
+
assert that an exception is \fInot\fR raised
|
861
|
+
T}
|
862
|
+
T{
|
863
|
+
.sp
|
864
|
+
C!()
|
865
|
+
T}:T{
|
866
|
+
.sp
|
867
|
+
assert that a symbol is \fInot\fR thrown
|
868
|
+
T}
|
869
|
+
.TE
|
870
|
+
.sp 1
|
871
|
+
.SS "Sampling assertions"
|
872
|
+
.sp
|
873
|
+
The following methods let you \fIcheck the outcome\fR of an assertion without recording a success or failure in the test execution report\&.
|
874
|
+
.TS
|
875
|
+
tab(:);
|
876
|
+
lt lt
|
877
|
+
lt lt
|
878
|
+
lt lt
|
879
|
+
lt lt
|
880
|
+
lt lt.
|
881
|
+
T{
|
882
|
+
.sp
|
883
|
+
T?()
|
884
|
+
T}:T{
|
885
|
+
.sp
|
886
|
+
returns true if T() passes; false otherwise
|
887
|
+
T}
|
888
|
+
T{
|
889
|
+
.sp
|
890
|
+
F?()
|
891
|
+
T}:T{
|
892
|
+
.sp
|
893
|
+
returns true if F() passes; false otherwise
|
894
|
+
T}
|
895
|
+
T{
|
896
|
+
.sp
|
897
|
+
N?()
|
898
|
+
T}:T{
|
899
|
+
.sp
|
900
|
+
returns true if N() passes; false otherwise
|
901
|
+
T}
|
902
|
+
T{
|
903
|
+
.sp
|
904
|
+
E?()
|
905
|
+
T}:T{
|
906
|
+
.sp
|
907
|
+
returns true if E() passes; false otherwise
|
908
|
+
T}
|
909
|
+
T{
|
910
|
+
.sp
|
911
|
+
C?()
|
912
|
+
T}:T{
|
913
|
+
.sp
|
914
|
+
returns true if C() passes; false otherwise
|
915
|
+
T}
|
916
|
+
.TE
|
917
|
+
.sp 1
|
918
|
+
.SS "Assertion failure reports"
|
919
|
+
.sp
|
920
|
+
Assertions failures are reported in the following manner:
|
921
|
+
.sp
|
922
|
+
.if n \{\
|
923
|
+
.RS 4
|
924
|
+
.\}
|
925
|
+
.nf
|
926
|
+
\- fail: block must yield true (!nil && !false)
|
927
|
+
call:
|
928
|
+
\- test/simple\&.rb:17
|
929
|
+
\- test/simple\&.rb:3
|
930
|
+
code: |\-
|
931
|
+
[12\&.\&.22] in test/simple\&.rb
|
932
|
+
12
|
933
|
+
13 D "with more nested tests" do
|
934
|
+
14 x = 5
|
935
|
+
15
|
936
|
+
16 T { x > 2 } # passes
|
937
|
+
=> 17 F { x > 2 } # fails
|
938
|
+
18 E { x\&.hello } # passes
|
939
|
+
19 end
|
940
|
+
20 end
|
941
|
+
21
|
942
|
+
22 # equivalent of before(:each) or setup()
|
943
|
+
bind: test/simple\&.rb:17
|
944
|
+
vars:
|
945
|
+
x: (Fixnum) 5
|
946
|
+
y: (Fixnum) 83
|
947
|
+
.fi
|
948
|
+
.if n \{\
|
949
|
+
.RE
|
950
|
+
.\}
|
951
|
+
.sp
|
952
|
+
Failure reports are composed of the following sections:
|
953
|
+
.TS
|
954
|
+
tab(:);
|
955
|
+
lt lt
|
956
|
+
lt lt
|
957
|
+
lt lt
|
958
|
+
lt lt
|
959
|
+
lt lt.
|
960
|
+
T{
|
961
|
+
.sp
|
962
|
+
:fail
|
963
|
+
T}:T{
|
964
|
+
.sp
|
965
|
+
Description of the assertion failure\&.
|
966
|
+
T}
|
967
|
+
T{
|
968
|
+
.sp
|
969
|
+
:call
|
970
|
+
T}:T{
|
971
|
+
.sp
|
972
|
+
Stack trace leading to the point of failure\&.
|
973
|
+
T}
|
974
|
+
T{
|
975
|
+
.sp
|
976
|
+
:code
|
977
|
+
T}:T{
|
978
|
+
.sp
|
979
|
+
Source code surrounding the point of failure\&.
|
980
|
+
T}
|
981
|
+
T{
|
982
|
+
.sp
|
983
|
+
:bind
|
984
|
+
T}:T{
|
985
|
+
.sp
|
986
|
+
Source location of values in :vars section\&.
|
987
|
+
T}
|
988
|
+
T{
|
989
|
+
.sp
|
990
|
+
:vars
|
991
|
+
T}:T{
|
992
|
+
.sp
|
993
|
+
Local variables visible at the point of failure\&.
|
994
|
+
T}
|
995
|
+
.TE
|
996
|
+
.sp 1
|
997
|
+
.sp
|
998
|
+
After the failure is reported, you will be placed into a debugger to investigate the failure if the Detest\&.debug option is enabled\&.
|
999
|
+
.sp
|
1000
|
+
Assertion failure reports can be accessed at any time within the test execution trace provided by the Detest\&.trace() method\&.
|
1001
|
+
.SH "EMULATION"
|
1002
|
+
.sp
|
1003
|
+
Detest can emulate several popular testing libraries:
|
1004
|
+
.TS
|
1005
|
+
tab(:);
|
1006
|
+
lt lt
|
1007
|
+
lt lt
|
1008
|
+
lt lt
|
1009
|
+
lt lt.
|
1010
|
+
T{
|
1011
|
+
.sp
|
1012
|
+
detest/spec
|
1013
|
+
T}:T{
|
1014
|
+
.sp
|
1015
|
+
[RSpec] emulation layer
|
1016
|
+
T}
|
1017
|
+
T{
|
1018
|
+
.sp
|
1019
|
+
detest/unit
|
1020
|
+
T}:T{
|
1021
|
+
.sp
|
1022
|
+
[Test::Unit] emulation layer
|
1023
|
+
T}
|
1024
|
+
T{
|
1025
|
+
.sp
|
1026
|
+
detest/mini
|
1027
|
+
T}:T{
|
1028
|
+
.sp
|
1029
|
+
[Minitest] emulation layer
|
1030
|
+
T}
|
1031
|
+
T{
|
1032
|
+
.sp
|
1033
|
+
detest/long
|
1034
|
+
T}:T{
|
1035
|
+
.sp
|
1036
|
+
Readability emulation layer
|
1037
|
+
T}
|
1038
|
+
.TE
|
1039
|
+
.sp 1
|
1040
|
+
.sp
|
1041
|
+
Simply require one of these emulation layers into your test suite and you can write your tests using the familiar syntax of the testing library it emulates\&.
|
1042
|
+
.SS "detest/spec"
|
1043
|
+
.sp
|
1044
|
+
This library emulates [RSpec] by adding the following methods to the Detest module\&.
|
1045
|
+
.TS
|
1046
|
+
tab(:);
|
1047
|
+
lt lt
|
1048
|
+
lt lt
|
1049
|
+
lt lt
|
1050
|
+
lt lt
|
1051
|
+
lt lt.
|
1052
|
+
T{
|
1053
|
+
.sp
|
1054
|
+
after(\fIwhat\fR, &\fIblock\fR)
|
1055
|
+
T}:T{
|
1056
|
+
.sp
|
1057
|
+
lib/detest/spec\&.rb:21
|
1058
|
+
T}
|
1059
|
+
T{
|
1060
|
+
.sp
|
1061
|
+
before(\fIwhat\fR, &\fIblock\fR)
|
1062
|
+
T}:T{
|
1063
|
+
.sp
|
1064
|
+
lib/detest/spec\&.rb:10
|
1065
|
+
T}
|
1066
|
+
T{
|
1067
|
+
.sp
|
1068
|
+
context(*\fIargs\fR, &\fIblock\fR)
|
1069
|
+
T}:T{
|
1070
|
+
.sp
|
1071
|
+
lib/detest\&.rb:1168
|
1072
|
+
T}
|
1073
|
+
T{
|
1074
|
+
.sp
|
1075
|
+
describe(*\fIargs\fR, &\fIblock\fR)
|
1076
|
+
T}:T{
|
1077
|
+
.sp
|
1078
|
+
lib/detest\&.rb:1168
|
1079
|
+
T}
|
1080
|
+
T{
|
1081
|
+
.sp
|
1082
|
+
it(*\fIargs\fR, &\fIblock\fR)
|
1083
|
+
T}:T{
|
1084
|
+
.sp
|
1085
|
+
lib/detest\&.rb:1168
|
1086
|
+
T}
|
1087
|
+
.TE
|
1088
|
+
.sp 1
|
1089
|
+
.SS "detest/unit"
|
1090
|
+
.sp
|
1091
|
+
This library emulates [Test::Unit] by adding the following methods to the Detest module\&.
|
1092
|
+
.TS
|
1093
|
+
tab(:);
|
1094
|
+
lt lt
|
1095
|
+
lt lt
|
1096
|
+
lt lt
|
1097
|
+
lt lt
|
1098
|
+
lt lt
|
1099
|
+
lt lt
|
1100
|
+
lt lt
|
1101
|
+
lt lt
|
1102
|
+
lt lt
|
1103
|
+
lt lt
|
1104
|
+
lt lt
|
1105
|
+
lt lt
|
1106
|
+
lt lt
|
1107
|
+
lt lt
|
1108
|
+
lt lt
|
1109
|
+
lt lt
|
1110
|
+
lt lt
|
1111
|
+
lt lt
|
1112
|
+
lt lt
|
1113
|
+
lt lt
|
1114
|
+
lt lt
|
1115
|
+
lt lt
|
1116
|
+
lt lt
|
1117
|
+
lt lt
|
1118
|
+
lt lt
|
1119
|
+
lt lt
|
1120
|
+
lt lt
|
1121
|
+
lt lt
|
1122
|
+
lt lt
|
1123
|
+
lt lt
|
1124
|
+
lt lt
|
1125
|
+
lt lt
|
1126
|
+
lt lt
|
1127
|
+
lt lt
|
1128
|
+
lt lt
|
1129
|
+
lt lt
|
1130
|
+
lt lt.
|
1131
|
+
T{
|
1132
|
+
.sp
|
1133
|
+
assert(*\fIargs\fR, &\fIblock\fR)
|
1134
|
+
T}:T{
|
1135
|
+
.sp
|
1136
|
+
lib/detest\&.rb:1168
|
1137
|
+
T}
|
1138
|
+
T{
|
1139
|
+
.sp
|
1140
|
+
assert_empty(\fIcollection\fR, \fImessage\fR=nil)
|
1141
|
+
T}:T{
|
1142
|
+
.sp
|
1143
|
+
lib/detest/unit\&.rb:26
|
1144
|
+
T}
|
1145
|
+
T{
|
1146
|
+
.sp
|
1147
|
+
assert_equal(\fIexpected\fR, \fIactual\fR, \fImessage\fR=nil)
|
1148
|
+
T}:T{
|
1149
|
+
.sp
|
1150
|
+
lib/detest/unit\&.rb:31
|
1151
|
+
T}
|
1152
|
+
T{
|
1153
|
+
.sp
|
1154
|
+
assert_in_delta(\fIexpected\fR, \fIactual\fR, \fIdelta\fR=nil, \fImessage\fR=nil)
|
1155
|
+
T}:T{
|
1156
|
+
.sp
|
1157
|
+
lib/detest/unit\&.rb:36
|
1158
|
+
T}
|
1159
|
+
T{
|
1160
|
+
.sp
|
1161
|
+
assert_in_epsilon(\fIexpected\fR, \fIactual\fR, \fIdelta\fR=nil, \fImessage\fR=nil)
|
1162
|
+
T}:T{
|
1163
|
+
.sp
|
1164
|
+
lib/detest/unit\&.rb:36
|
1165
|
+
T}
|
1166
|
+
T{
|
1167
|
+
.sp
|
1168
|
+
assert_include(\fIitem\fR, \fIcollection\fR, \fImessage\fR=nil)
|
1169
|
+
T}:T{
|
1170
|
+
.sp
|
1171
|
+
lib/detest/unit\&.rb:47
|
1172
|
+
T}
|
1173
|
+
T{
|
1174
|
+
.sp
|
1175
|
+
assert_instance_of(\fIklass\fR, \fIobject\fR, \fImessage\fR=nil)
|
1176
|
+
T}:T{
|
1177
|
+
.sp
|
1178
|
+
lib/detest/unit\&.rb:52
|
1179
|
+
T}
|
1180
|
+
T{
|
1181
|
+
.sp
|
1182
|
+
assert_kind_of(\fIklass\fR, \fIobject\fR, \fImessage\fR=nil)
|
1183
|
+
T}:T{
|
1184
|
+
.sp
|
1185
|
+
lib/detest/unit\&.rb:57
|
1186
|
+
T}
|
1187
|
+
T{
|
1188
|
+
.sp
|
1189
|
+
assert_match(\fIpattern\fR, \fIstring\fR, \fImessage\fR=nil)
|
1190
|
+
T}:T{
|
1191
|
+
.sp
|
1192
|
+
lib/detest/unit\&.rb:67
|
1193
|
+
T}
|
1194
|
+
T{
|
1195
|
+
.sp
|
1196
|
+
assert_nil(\fIobject\fR, \fImessage\fR=nil)
|
1197
|
+
T}:T{
|
1198
|
+
.sp
|
1199
|
+
lib/detest/unit\&.rb:62
|
1200
|
+
T}
|
1201
|
+
T{
|
1202
|
+
.sp
|
1203
|
+
assert_not(*\fIargs\fR, &\fIblock\fR)
|
1204
|
+
T}:T{
|
1205
|
+
.sp
|
1206
|
+
lib/detest\&.rb:1168
|
1207
|
+
T}
|
1208
|
+
T{
|
1209
|
+
.sp
|
1210
|
+
assert_not_empty(\fIcollection\fR, \fImessage\fR=nil)
|
1211
|
+
T}:T{
|
1212
|
+
.sp
|
1213
|
+
lib/detest/unit\&.rb:26
|
1214
|
+
T}
|
1215
|
+
T{
|
1216
|
+
.sp
|
1217
|
+
assert_not_equal(\fIexpected\fR, \fIactual\fR, \fImessage\fR=nil)
|
1218
|
+
T}:T{
|
1219
|
+
.sp
|
1220
|
+
lib/detest/unit\&.rb:31
|
1221
|
+
T}
|
1222
|
+
T{
|
1223
|
+
.sp
|
1224
|
+
assert_not_in_delta(\fIexpected\fR, \fIactual\fR, \fIdelta\fR=nil, \fImessage\fR=nil)
|
1225
|
+
T}:T{
|
1226
|
+
.sp
|
1227
|
+
lib/detest/unit\&.rb:36
|
1228
|
+
T}
|
1229
|
+
T{
|
1230
|
+
.sp
|
1231
|
+
assert_not_in_epsilon(\fIexpected\fR, \fIactual\fR, \fIdelta\fR=nil, \fImessage\fR=nil)
|
1232
|
+
T}:T{
|
1233
|
+
.sp
|
1234
|
+
lib/detest/unit\&.rb:36
|
1235
|
+
T}
|
1236
|
+
T{
|
1237
|
+
.sp
|
1238
|
+
assert_not_include(\fIitem\fR, \fIcollection\fR, \fImessage\fR=nil)
|
1239
|
+
T}:T{
|
1240
|
+
.sp
|
1241
|
+
lib/detest/unit\&.rb:47
|
1242
|
+
T}
|
1243
|
+
T{
|
1244
|
+
.sp
|
1245
|
+
assert_not_instance_of(\fIklass\fR, \fIobject\fR, \fImessage\fR=nil)
|
1246
|
+
T}:T{
|
1247
|
+
.sp
|
1248
|
+
lib/detest/unit\&.rb:52
|
1249
|
+
T}
|
1250
|
+
T{
|
1251
|
+
.sp
|
1252
|
+
assert_not_kind_of(\fIklass\fR, \fIobject\fR, \fImessage\fR=nil)
|
1253
|
+
T}:T{
|
1254
|
+
.sp
|
1255
|
+
lib/detest/unit\&.rb:57
|
1256
|
+
T}
|
1257
|
+
T{
|
1258
|
+
.sp
|
1259
|
+
assert_not_match(\fIpattern\fR, \fIstring\fR, \fImessage\fR=nil)
|
1260
|
+
T}:T{
|
1261
|
+
.sp
|
1262
|
+
lib/detest/unit\&.rb:67
|
1263
|
+
T}
|
1264
|
+
T{
|
1265
|
+
.sp
|
1266
|
+
assert_not_nil(\fIobject\fR, \fImessage\fR=nil)
|
1267
|
+
T}:T{
|
1268
|
+
.sp
|
1269
|
+
lib/detest/unit\&.rb:62
|
1270
|
+
T}
|
1271
|
+
T{
|
1272
|
+
.sp
|
1273
|
+
assert_not_operator(\fIobject\fR, \fIoperator\fR, \fIoperand\fR, \fImessage\fR=nil)
|
1274
|
+
T}:T{
|
1275
|
+
.sp
|
1276
|
+
lib/detest/unit\&.rb:77
|
1277
|
+
T}
|
1278
|
+
T{
|
1279
|
+
.sp
|
1280
|
+
assert_not_raise(*\fIargs\fR, &\fIblock\fR)
|
1281
|
+
T}:T{
|
1282
|
+
.sp
|
1283
|
+
lib/detest/unit\&.rb:82
|
1284
|
+
T}
|
1285
|
+
T{
|
1286
|
+
.sp
|
1287
|
+
assert_not_respond_to(\fIobject\fR, \fIquery\fR, \fImessage\fR=nil)
|
1288
|
+
T}:T{
|
1289
|
+
.sp
|
1290
|
+
lib/detest/unit\&.rb:86
|
1291
|
+
T}
|
1292
|
+
T{
|
1293
|
+
.sp
|
1294
|
+
assert_not_same(\fIexpected\fR, \fIactual\fR, \fImessage\fR=nil)
|
1295
|
+
T}:T{
|
1296
|
+
.sp
|
1297
|
+
lib/detest/unit\&.rb:72
|
1298
|
+
T}
|
1299
|
+
T{
|
1300
|
+
.sp
|
1301
|
+
assert_not_send(\fIobject\fR, \fIquery\fR, *\fIargs\fR)
|
1302
|
+
T}:T{
|
1303
|
+
.sp
|
1304
|
+
lib/detest/unit\&.rb:95
|
1305
|
+
T}
|
1306
|
+
T{
|
1307
|
+
.sp
|
1308
|
+
assert_not_throw(\fIsymbol\fR, \fImessage\fR=nil, &\fIblock\fR)
|
1309
|
+
T}:T{
|
1310
|
+
.sp
|
1311
|
+
lib/detest/unit\&.rb:91
|
1312
|
+
T}
|
1313
|
+
T{
|
1314
|
+
.sp
|
1315
|
+
assert_operator(\fIobject\fR, \fIoperator\fR, \fIoperand\fR, \fImessage\fR=nil)
|
1316
|
+
T}:T{
|
1317
|
+
.sp
|
1318
|
+
lib/detest/unit\&.rb:77
|
1319
|
+
T}
|
1320
|
+
T{
|
1321
|
+
.sp
|
1322
|
+
assert_raise(*\fIargs\fR, &\fIblock\fR)
|
1323
|
+
T}:T{
|
1324
|
+
.sp
|
1325
|
+
lib/detest/unit\&.rb:82
|
1326
|
+
T}
|
1327
|
+
T{
|
1328
|
+
.sp
|
1329
|
+
assert_respond_to(\fIobject\fR, \fIquery\fR, \fImessage\fR=nil)
|
1330
|
+
T}:T{
|
1331
|
+
.sp
|
1332
|
+
lib/detest/unit\&.rb:86
|
1333
|
+
T}
|
1334
|
+
T{
|
1335
|
+
.sp
|
1336
|
+
assert_same(\fIexpected\fR, \fIactual\fR, \fImessage\fR=nil)
|
1337
|
+
T}:T{
|
1338
|
+
.sp
|
1339
|
+
lib/detest/unit\&.rb:72
|
1340
|
+
T}
|
1341
|
+
T{
|
1342
|
+
.sp
|
1343
|
+
assert_send(\fIobject\fR, \fIquery\fR, *\fIargs\fR)
|
1344
|
+
T}:T{
|
1345
|
+
.sp
|
1346
|
+
lib/detest/unit\&.rb:95
|
1347
|
+
T}
|
1348
|
+
T{
|
1349
|
+
.sp
|
1350
|
+
assert_throw(\fIsymbol\fR, \fImessage\fR=nil, &\fIblock\fR)
|
1351
|
+
T}:T{
|
1352
|
+
.sp
|
1353
|
+
lib/detest/unit\&.rb:91
|
1354
|
+
T}
|
1355
|
+
T{
|
1356
|
+
.sp
|
1357
|
+
setup(*\fIargs\fR, &\fIblock\fR)
|
1358
|
+
T}:T{
|
1359
|
+
.sp
|
1360
|
+
lib/detest\&.rb:1168
|
1361
|
+
T}
|
1362
|
+
T{
|
1363
|
+
.sp
|
1364
|
+
setup!(*\fIargs\fR, &\fIblock\fR)
|
1365
|
+
T}:T{
|
1366
|
+
.sp
|
1367
|
+
lib/detest\&.rb:1168
|
1368
|
+
T}
|
1369
|
+
T{
|
1370
|
+
.sp
|
1371
|
+
teardown(*\fIargs\fR, &\fIblock\fR)
|
1372
|
+
T}:T{
|
1373
|
+
.sp
|
1374
|
+
lib/detest\&.rb:1168
|
1375
|
+
T}
|
1376
|
+
T{
|
1377
|
+
.sp
|
1378
|
+
teardown!(*\fIargs\fR, &\fIblock\fR)
|
1379
|
+
T}:T{
|
1380
|
+
.sp
|
1381
|
+
lib/detest\&.rb:1168
|
1382
|
+
T}
|
1383
|
+
T{
|
1384
|
+
.sp
|
1385
|
+
test(*\fIargs\fR, &\fIblock\fR)
|
1386
|
+
T}:T{
|
1387
|
+
.sp
|
1388
|
+
lib/detest\&.rb:1168
|
1389
|
+
T}
|
1390
|
+
.TE
|
1391
|
+
.sp 1
|
1392
|
+
.SS "detest/mini"
|
1393
|
+
.sp
|
1394
|
+
This library emulates [Minitest] by adding the following methods to the Detest module\&.
|
1395
|
+
.TS
|
1396
|
+
tab(:);
|
1397
|
+
lt lt
|
1398
|
+
lt lt
|
1399
|
+
lt lt
|
1400
|
+
lt lt
|
1401
|
+
lt lt
|
1402
|
+
lt lt
|
1403
|
+
lt lt
|
1404
|
+
lt lt
|
1405
|
+
lt lt
|
1406
|
+
lt lt
|
1407
|
+
lt lt
|
1408
|
+
lt lt
|
1409
|
+
lt lt
|
1410
|
+
lt lt
|
1411
|
+
lt lt
|
1412
|
+
lt lt.
|
1413
|
+
T{
|
1414
|
+
.sp
|
1415
|
+
refute(*\fIargs\fR, &\fIblock\fR)
|
1416
|
+
T}:T{
|
1417
|
+
.sp
|
1418
|
+
lib/detest\&.rb:1168
|
1419
|
+
T}
|
1420
|
+
T{
|
1421
|
+
.sp
|
1422
|
+
refute_empty(\fIcollection\fR, \fImessage\fR=nil)
|
1423
|
+
T}:T{
|
1424
|
+
.sp
|
1425
|
+
lib/detest/unit\&.rb:26
|
1426
|
+
T}
|
1427
|
+
T{
|
1428
|
+
.sp
|
1429
|
+
refute_equal(\fIexpected\fR, \fIactual\fR, \fImessage\fR=nil)
|
1430
|
+
T}:T{
|
1431
|
+
.sp
|
1432
|
+
lib/detest/unit\&.rb:31
|
1433
|
+
T}
|
1434
|
+
T{
|
1435
|
+
.sp
|
1436
|
+
refute_in_delta(\fIexpected\fR, \fIactual\fR, \fIdelta\fR=nil, \fImessage\fR=nil)
|
1437
|
+
T}:T{
|
1438
|
+
.sp
|
1439
|
+
lib/detest/unit\&.rb:36
|
1440
|
+
T}
|
1441
|
+
T{
|
1442
|
+
.sp
|
1443
|
+
refute_in_epsilon(\fIexpected\fR, \fIactual\fR, \fIdelta\fR=nil, \fImessage\fR=nil)
|
1444
|
+
T}:T{
|
1445
|
+
.sp
|
1446
|
+
lib/detest/unit\&.rb:36
|
1447
|
+
T}
|
1448
|
+
T{
|
1449
|
+
.sp
|
1450
|
+
refute_include(\fIitem\fR, \fIcollection\fR, \fImessage\fR=nil)
|
1451
|
+
T}:T{
|
1452
|
+
.sp
|
1453
|
+
lib/detest/unit\&.rb:47
|
1454
|
+
T}
|
1455
|
+
T{
|
1456
|
+
.sp
|
1457
|
+
refute_instance_of(\fIklass\fR, \fIobject\fR, \fImessage\fR=nil)
|
1458
|
+
T}:T{
|
1459
|
+
.sp
|
1460
|
+
lib/detest/unit\&.rb:52
|
1461
|
+
T}
|
1462
|
+
T{
|
1463
|
+
.sp
|
1464
|
+
refute_kind_of(\fIklass\fR, \fIobject\fR, \fImessage\fR=nil)
|
1465
|
+
T}:T{
|
1466
|
+
.sp
|
1467
|
+
lib/detest/unit\&.rb:57
|
1468
|
+
T}
|
1469
|
+
T{
|
1470
|
+
.sp
|
1471
|
+
refute_match(\fIpattern\fR, \fIstring\fR, \fImessage\fR=nil)
|
1472
|
+
T}:T{
|
1473
|
+
.sp
|
1474
|
+
lib/detest/unit\&.rb:67
|
1475
|
+
T}
|
1476
|
+
T{
|
1477
|
+
.sp
|
1478
|
+
refute_nil(\fIobject\fR, \fImessage\fR=nil)
|
1479
|
+
T}:T{
|
1480
|
+
.sp
|
1481
|
+
lib/detest/unit\&.rb:62
|
1482
|
+
T}
|
1483
|
+
T{
|
1484
|
+
.sp
|
1485
|
+
refute_operator(\fIobject\fR, \fIoperator\fR, \fIoperand\fR, \fImessage\fR=nil)
|
1486
|
+
T}:T{
|
1487
|
+
.sp
|
1488
|
+
lib/detest/unit\&.rb:77
|
1489
|
+
T}
|
1490
|
+
T{
|
1491
|
+
.sp
|
1492
|
+
refute_raise(*\fIargs\fR, &\fIblock\fR)
|
1493
|
+
T}:T{
|
1494
|
+
.sp
|
1495
|
+
lib/detest/unit\&.rb:82
|
1496
|
+
T}
|
1497
|
+
T{
|
1498
|
+
.sp
|
1499
|
+
refute_respond_to(\fIobject\fR, \fIquery\fR, \fImessage\fR=nil)
|
1500
|
+
T}:T{
|
1501
|
+
.sp
|
1502
|
+
lib/detest/unit\&.rb:86
|
1503
|
+
T}
|
1504
|
+
T{
|
1505
|
+
.sp
|
1506
|
+
refute_same(\fIexpected\fR, \fIactual\fR, \fImessage\fR=nil)
|
1507
|
+
T}:T{
|
1508
|
+
.sp
|
1509
|
+
lib/detest/unit\&.rb:72
|
1510
|
+
T}
|
1511
|
+
T{
|
1512
|
+
.sp
|
1513
|
+
refute_send(\fIobject\fR, \fIquery\fR, *\fIargs\fR)
|
1514
|
+
T}:T{
|
1515
|
+
.sp
|
1516
|
+
lib/detest/unit\&.rb:95
|
1517
|
+
T}
|
1518
|
+
T{
|
1519
|
+
.sp
|
1520
|
+
refute_throw(\fIsymbol\fR, \fImessage\fR=nil, &\fIblock\fR)
|
1521
|
+
T}:T{
|
1522
|
+
.sp
|
1523
|
+
lib/detest/unit\&.rb:91
|
1524
|
+
T}
|
1525
|
+
.TE
|
1526
|
+
.sp 1
|
1527
|
+
.SS "detest/long"
|
1528
|
+
.sp
|
1529
|
+
This library emulates Readability by adding the following methods to the Detest module\&.
|
1530
|
+
.TS
|
1531
|
+
tab(:);
|
1532
|
+
lt lt
|
1533
|
+
lt lt
|
1534
|
+
lt lt
|
1535
|
+
lt lt
|
1536
|
+
lt lt
|
1537
|
+
lt lt
|
1538
|
+
lt lt
|
1539
|
+
lt lt
|
1540
|
+
lt lt
|
1541
|
+
lt lt
|
1542
|
+
lt lt
|
1543
|
+
lt lt
|
1544
|
+
lt lt
|
1545
|
+
lt lt
|
1546
|
+
lt lt
|
1547
|
+
lt lt
|
1548
|
+
lt lt
|
1549
|
+
lt lt
|
1550
|
+
lt lt
|
1551
|
+
lt lt
|
1552
|
+
lt lt
|
1553
|
+
lt lt.
|
1554
|
+
T{
|
1555
|
+
.sp
|
1556
|
+
Catch(*\fIargs\fR, &\fIblock\fR)
|
1557
|
+
T}:T{
|
1558
|
+
.sp
|
1559
|
+
lib/detest\&.rb:1168
|
1560
|
+
T}
|
1561
|
+
T{
|
1562
|
+
.sp
|
1563
|
+
Catch!(*\fIargs\fR, &\fIblock\fR)
|
1564
|
+
T}:T{
|
1565
|
+
.sp
|
1566
|
+
lib/detest\&.rb:1168
|
1567
|
+
T}
|
1568
|
+
T{
|
1569
|
+
.sp
|
1570
|
+
Catch?(*\fIargs\fR, &\fIblock\fR)
|
1571
|
+
T}:T{
|
1572
|
+
.sp
|
1573
|
+
lib/detest\&.rb:1168
|
1574
|
+
T}
|
1575
|
+
T{
|
1576
|
+
.sp
|
1577
|
+
Describe(*\fIargs\fR, &\fIblock\fR)
|
1578
|
+
T}:T{
|
1579
|
+
.sp
|
1580
|
+
lib/detest\&.rb:1168
|
1581
|
+
T}
|
1582
|
+
T{
|
1583
|
+
.sp
|
1584
|
+
Describe!(*\fIargs\fR, &\fIblock\fR)
|
1585
|
+
T}:T{
|
1586
|
+
.sp
|
1587
|
+
lib/detest\&.rb:1168
|
1588
|
+
T}
|
1589
|
+
T{
|
1590
|
+
.sp
|
1591
|
+
Error(*\fIargs\fR, &\fIblock\fR)
|
1592
|
+
T}:T{
|
1593
|
+
.sp
|
1594
|
+
lib/detest\&.rb:1168
|
1595
|
+
T}
|
1596
|
+
T{
|
1597
|
+
.sp
|
1598
|
+
Error!(*\fIargs\fR, &\fIblock\fR)
|
1599
|
+
T}:T{
|
1600
|
+
.sp
|
1601
|
+
lib/detest\&.rb:1168
|
1602
|
+
T}
|
1603
|
+
T{
|
1604
|
+
.sp
|
1605
|
+
Error?(*\fIargs\fR, &\fIblock\fR)
|
1606
|
+
T}:T{
|
1607
|
+
.sp
|
1608
|
+
lib/detest\&.rb:1168
|
1609
|
+
T}
|
1610
|
+
T{
|
1611
|
+
.sp
|
1612
|
+
False(*\fIargs\fR, &\fIblock\fR)
|
1613
|
+
T}:T{
|
1614
|
+
.sp
|
1615
|
+
lib/detest\&.rb:1168
|
1616
|
+
T}
|
1617
|
+
T{
|
1618
|
+
.sp
|
1619
|
+
False!(*\fIargs\fR, &\fIblock\fR)
|
1620
|
+
T}:T{
|
1621
|
+
.sp
|
1622
|
+
lib/detest\&.rb:1168
|
1623
|
+
T}
|
1624
|
+
T{
|
1625
|
+
.sp
|
1626
|
+
False?(*\fIargs\fR, &\fIblock\fR)
|
1627
|
+
T}:T{
|
1628
|
+
.sp
|
1629
|
+
lib/detest\&.rb:1168
|
1630
|
+
T}
|
1631
|
+
T{
|
1632
|
+
.sp
|
1633
|
+
Inform(*\fIargs\fR, &\fIblock\fR)
|
1634
|
+
T}:T{
|
1635
|
+
.sp
|
1636
|
+
lib/detest\&.rb:1168
|
1637
|
+
T}
|
1638
|
+
T{
|
1639
|
+
.sp
|
1640
|
+
Inform!(*\fIargs\fR, &\fIblock\fR)
|
1641
|
+
T}:T{
|
1642
|
+
.sp
|
1643
|
+
lib/detest\&.rb:1168
|
1644
|
+
T}
|
1645
|
+
T{
|
1646
|
+
.sp
|
1647
|
+
Nil(*\fIargs\fR, &\fIblock\fR)
|
1648
|
+
T}:T{
|
1649
|
+
.sp
|
1650
|
+
lib/detest\&.rb:1168
|
1651
|
+
T}
|
1652
|
+
T{
|
1653
|
+
.sp
|
1654
|
+
Nil!(*\fIargs\fR, &\fIblock\fR)
|
1655
|
+
T}:T{
|
1656
|
+
.sp
|
1657
|
+
lib/detest\&.rb:1168
|
1658
|
+
T}
|
1659
|
+
T{
|
1660
|
+
.sp
|
1661
|
+
Nil?(*\fIargs\fR, &\fIblock\fR)
|
1662
|
+
T}:T{
|
1663
|
+
.sp
|
1664
|
+
lib/detest\&.rb:1168
|
1665
|
+
T}
|
1666
|
+
T{
|
1667
|
+
.sp
|
1668
|
+
Share(*\fIargs\fR, &\fIblock\fR)
|
1669
|
+
T}:T{
|
1670
|
+
.sp
|
1671
|
+
lib/detest\&.rb:1168
|
1672
|
+
T}
|
1673
|
+
T{
|
1674
|
+
.sp
|
1675
|
+
Share!(*\fIargs\fR, &\fIblock\fR)
|
1676
|
+
T}:T{
|
1677
|
+
.sp
|
1678
|
+
lib/detest\&.rb:1168
|
1679
|
+
T}
|
1680
|
+
T{
|
1681
|
+
.sp
|
1682
|
+
Share?(*\fIargs\fR, &\fIblock\fR)
|
1683
|
+
T}:T{
|
1684
|
+
.sp
|
1685
|
+
lib/detest\&.rb:1168
|
1686
|
+
T}
|
1687
|
+
T{
|
1688
|
+
.sp
|
1689
|
+
True(*\fIargs\fR, &\fIblock\fR)
|
1690
|
+
T}:T{
|
1691
|
+
.sp
|
1692
|
+
lib/detest\&.rb:1168
|
1693
|
+
T}
|
1694
|
+
T{
|
1695
|
+
.sp
|
1696
|
+
True!(*\fIargs\fR, &\fIblock\fR)
|
1697
|
+
T}:T{
|
1698
|
+
.sp
|
1699
|
+
lib/detest\&.rb:1168
|
1700
|
+
T}
|
1701
|
+
T{
|
1702
|
+
.sp
|
1703
|
+
True?(*\fIargs\fR, &\fIblock\fR)
|
1704
|
+
T}:T{
|
1705
|
+
.sp
|
1706
|
+
lib/detest\&.rb:1168
|
1707
|
+
T}
|
1708
|
+
.TE
|
1709
|
+
.sp 1
|
1710
|
+
.SH "HACKING"
|
1711
|
+
.SS "Prerequisites"
|
1712
|
+
.sp
|
1713
|
+
Install Ruby libraries necessary for development:
|
1714
|
+
.sp
|
1715
|
+
.if n \{\
|
1716
|
+
.RS 4
|
1717
|
+
.\}
|
1718
|
+
.nf
|
1719
|
+
gem install detest \-\-development
|
1720
|
+
.fi
|
1721
|
+
.if n \{\
|
1722
|
+
.RE
|
1723
|
+
.\}
|
1724
|
+
.SS "Infrastructure"
|
1725
|
+
.sp
|
1726
|
+
[Inochi] serves as the project infrastructure for Detest\&. It handles tasks such as building this help manual and API documentation, and packaging, announcing, and publishing new releases\&. See its help manual and list of tasks to get started:
|
1727
|
+
.sp
|
1728
|
+
.if n \{\
|
1729
|
+
.RS 4
|
1730
|
+
.\}
|
1731
|
+
.nf
|
1732
|
+
inochi \-\-help # display help manual
|
1733
|
+
inochi \-\-tasks # list available tasks
|
1734
|
+
.fi
|
1735
|
+
.if n \{\
|
1736
|
+
.RE
|
1737
|
+
.\}
|
1738
|
+
.SS "$LOAD_PATH setup"
|
1739
|
+
.sp
|
1740
|
+
Ensure that the lib/ directory is listed in Ruby\(cqs $LOAD_PATH before you use any libraries therein or run any executables in the bin/ directory\&.
|
1741
|
+
.sp
|
1742
|
+
This can be achieved by passing an option to Ruby:
|
1743
|
+
.sp
|
1744
|
+
.if n \{\
|
1745
|
+
.RS 4
|
1746
|
+
.\}
|
1747
|
+
.nf
|
1748
|
+
ruby \-Ilib bin/detest
|
1749
|
+
irb \-Ilib \-r detest
|
1750
|
+
.fi
|
1751
|
+
.if n \{\
|
1752
|
+
.RE
|
1753
|
+
.\}
|
1754
|
+
.sp
|
1755
|
+
Or by setting the $RUBYLIB environment variable:
|
1756
|
+
.sp
|
1757
|
+
.if n \{\
|
1758
|
+
.RS 4
|
1759
|
+
.\}
|
1760
|
+
.nf
|
1761
|
+
export RUBYLIB=lib # bash, ksh, zsh
|
1762
|
+
setenv RUBYLIB lib # csh
|
1763
|
+
set \-x RUBYLIB lib # fish
|
1764
|
+
|
1765
|
+
ruby bin/detest
|
1766
|
+
irb \-r detest
|
1767
|
+
.fi
|
1768
|
+
.if n \{\
|
1769
|
+
.RE
|
1770
|
+
.\}
|
1771
|
+
.sp
|
1772
|
+
Or by running Ruby through the ruby\-wrapper tool\&.
|
1773
|
+
.SS "RubyGems setup"
|
1774
|
+
.sp
|
1775
|
+
If you use Ruby 1\&.8 or older, then ensure that RubyGems is activated before you use any libraries in the lib/ directory or run any executables in the bin/ directory\&.
|
1776
|
+
.sp
|
1777
|
+
This can be achieved by passing an option to Ruby:
|
1778
|
+
.sp
|
1779
|
+
.if n \{\
|
1780
|
+
.RS 4
|
1781
|
+
.\}
|
1782
|
+
.nf
|
1783
|
+
ruby \-rubygems bin/detest
|
1784
|
+
irb \-rubygems \-r detest
|
1785
|
+
.fi
|
1786
|
+
.if n \{\
|
1787
|
+
.RE
|
1788
|
+
.\}
|
1789
|
+
.sp
|
1790
|
+
Or by setting the $RUBYOPT environment variable:
|
1791
|
+
.sp
|
1792
|
+
.if n \{\
|
1793
|
+
.RS 4
|
1794
|
+
.\}
|
1795
|
+
.nf
|
1796
|
+
export RUBYOPT=\-rubygems # bash, ksh, zsh
|
1797
|
+
setenv RUBYOPT \-rubygems # csh
|
1798
|
+
set \-x RUBYOPT \-rubygems # fish
|
1799
|
+
.fi
|
1800
|
+
.if n \{\
|
1801
|
+
.RE
|
1802
|
+
.\}
|
1803
|
+
.SS "Running tests"
|
1804
|
+
.sp
|
1805
|
+
Simply execute the included test runner, which sets up Ruby\(cqs $LOAD_PATH for testing, loads the test/helper\&.rb file, and then evaluates all test/**/*_test\&.rb files:
|
1806
|
+
.sp
|
1807
|
+
.if n \{\
|
1808
|
+
.RS 4
|
1809
|
+
.\}
|
1810
|
+
.nf
|
1811
|
+
ruby test/runner
|
1812
|
+
.fi
|
1813
|
+
.if n \{\
|
1814
|
+
.RE
|
1815
|
+
.\}
|
1816
|
+
.sp
|
1817
|
+
Its exit status will indicate whether all tests have passed\&. It may also print additional pass/fail information depending on the testing library used in the test/helper\&.rb file\&.
|
1818
|
+
.SS "Contributing"
|
1819
|
+
.sp
|
1820
|
+
Fork this project on GitHub and send a pull request\&.
|
1821
|
+
.SH "HISTORY"
|
1822
|
+
.SS "Version 3\&.1\&.1 (2010\-08\-08)"
|
1823
|
+
.sp
|
1824
|
+
This release adds forgotten nil assertions and updates the help manual\&.
|
1825
|
+
.PP
|
1826
|
+
\fBBug fixes\fR
|
1827
|
+
.sp
|
1828
|
+
.RS 4
|
1829
|
+
.ie n \{\
|
1830
|
+
\h'-04'\(bu\h'+03'\c
|
1831
|
+
.\}
|
1832
|
+
.el \{\
|
1833
|
+
.sp -1
|
1834
|
+
.IP \(bu 2.3
|
1835
|
+
.\}
|
1836
|
+
Forgot to add nil assertion methods in the
|
1837
|
+
detest/long
|
1838
|
+
library\&.
|
1839
|
+
.RE
|
1840
|
+
.PP
|
1841
|
+
\fBHousekeeping\fR
|
1842
|
+
.sp
|
1843
|
+
.RS 4
|
1844
|
+
.ie n \{\
|
1845
|
+
\h'-04'\(bu\h'+03'\c
|
1846
|
+
.\}
|
1847
|
+
.el \{\
|
1848
|
+
.sp -1
|
1849
|
+
.IP \(bu 2.3
|
1850
|
+
.\}
|
1851
|
+
Upgrade to Inochi 5\&.0\&.0; the help manual is now written in AsciiDoc\&.
|
1852
|
+
.RE
|
1853
|
+
.SS "Version 3\&.1\&.0 (2010\-07\-25)"
|
1854
|
+
.sp
|
1855
|
+
This release adds N() methods for nil value assertions and renames the project from "DIFECTS" to "Detest" to avoid forming a habit of intentional misspellings\&.
|
1856
|
+
.PP
|
1857
|
+
\fBNew features\fR
|
1858
|
+
.sp
|
1859
|
+
.RS 4
|
1860
|
+
.ie n \{\
|
1861
|
+
\h'-04'\(bu\h'+03'\c
|
1862
|
+
.\}
|
1863
|
+
.el \{\
|
1864
|
+
.sp -1
|
1865
|
+
.IP \(bu 2.3
|
1866
|
+
.\}
|
1867
|
+
Add
|
1868
|
+
N(),
|
1869
|
+
N!(), and
|
1870
|
+
N?()
|
1871
|
+
methods for asserting that a value is nil\&. This idea comes from Gavin Sinclair\(cqs
|
1872
|
+
[Attest]
|
1873
|
+
assertion testing library\&.
|
1874
|
+
.RE
|
1875
|
+
.PP
|
1876
|
+
\fBHousekeeping\fR
|
1877
|
+
.sp
|
1878
|
+
.RS 4
|
1879
|
+
.ie n \{\
|
1880
|
+
\h'-04'\(bu\h'+03'\c
|
1881
|
+
.\}
|
1882
|
+
.el \{\
|
1883
|
+
.sp -1
|
1884
|
+
.IP \(bu 2.3
|
1885
|
+
.\}
|
1886
|
+
Rename project from "DIFECTS" to "Detest"\&.
|
1887
|
+
.RE
|
1888
|
+
.sp
|
1889
|
+
.RS 4
|
1890
|
+
.ie n \{\
|
1891
|
+
\h'-04'\(bu\h'+03'\c
|
1892
|
+
.\}
|
1893
|
+
.el \{\
|
1894
|
+
.sp -1
|
1895
|
+
.IP \(bu 2.3
|
1896
|
+
.\}
|
1897
|
+
Upgrade project to Inochi 4\&.0\&.0 infrastructure\&.
|
1898
|
+
.RE
|
1899
|
+
.sp
|
1900
|
+
.RS 4
|
1901
|
+
.ie n \{\
|
1902
|
+
\h'-04'\(bu\h'+03'\c
|
1903
|
+
.\}
|
1904
|
+
.el \{\
|
1905
|
+
.sp -1
|
1906
|
+
.IP \(bu 2.3
|
1907
|
+
.\}
|
1908
|
+
Minor code refactoring and manual revisions\&.
|
1909
|
+
.RE
|
1910
|
+
.SS "Version 3\&.0\&.1 (2010\-07\-25)"
|
1911
|
+
.sp
|
1912
|
+
This release fixes a bug in Ruby 1\&.8, refactors the code, and better documents test hooks in the manual\&.
|
1913
|
+
.PP
|
1914
|
+
\fBBug fixes\fR
|
1915
|
+
.sp
|
1916
|
+
.RS 4
|
1917
|
+
.ie n \{\
|
1918
|
+
\h'-04'\(bu\h'+03'\c
|
1919
|
+
.\}
|
1920
|
+
.el \{\
|
1921
|
+
.sp -1
|
1922
|
+
.IP \(bu 2.3
|
1923
|
+
.\}
|
1924
|
+
Ruby 1\&.8 does not pass value to
|
1925
|
+
Hash#delete_if()\&. All failure details were being omitted, instead of just the unavailable ones, as a result\&.
|
1926
|
+
.RE
|
1927
|
+
.PP
|
1928
|
+
\fBHousekeeping\fR
|
1929
|
+
.sp
|
1930
|
+
.RS 4
|
1931
|
+
.ie n \{\
|
1932
|
+
\h'-04'\(bu\h'+03'\c
|
1933
|
+
.\}
|
1934
|
+
.el \{\
|
1935
|
+
.sp -1
|
1936
|
+
.IP \(bu 2.3
|
1937
|
+
.\}
|
1938
|
+
Refactor variable values hash calculation and pretty printing logic\&.
|
1939
|
+
.RE
|
1940
|
+
.sp
|
1941
|
+
.RS 4
|
1942
|
+
.ie n \{\
|
1943
|
+
\h'-04'\(bu\h'+03'\c
|
1944
|
+
.\}
|
1945
|
+
.el \{\
|
1946
|
+
.sp -1
|
1947
|
+
.IP \(bu 2.3
|
1948
|
+
.\}
|
1949
|
+
Put FailureDetails pretty\-printing modules into their own namespace\&.
|
1950
|
+
.RE
|
1951
|
+
.sp
|
1952
|
+
.RS 4
|
1953
|
+
.ie n \{\
|
1954
|
+
\h'-04'\(bu\h'+03'\c
|
1955
|
+
.\}
|
1956
|
+
.el \{\
|
1957
|
+
.sp -1
|
1958
|
+
.IP \(bu 2.3
|
1959
|
+
.\}
|
1960
|
+
Raise error if closest insulated test cannot be not found\&.
|
1961
|
+
.RE
|
1962
|
+
.sp
|
1963
|
+
.RS 4
|
1964
|
+
.ie n \{\
|
1965
|
+
\h'-04'\(bu\h'+03'\c
|
1966
|
+
.\}
|
1967
|
+
.el \{\
|
1968
|
+
.sp -1
|
1969
|
+
.IP \(bu 2.3
|
1970
|
+
.\}
|
1971
|
+
Describe all test hooks and add example to manual, plus small revisions\&.
|
1972
|
+
.RE
|
1973
|
+
.SS "Version 3\&.0\&.0 (2010\-07\-24)"
|
1974
|
+
.sp
|
1975
|
+
This release renames the project from "Dfect" to "DIFECTS", reduces cruft, improves the presentation and debuggability of assertion failures, and revises the manual\&.
|
1976
|
+
.PP
|
1977
|
+
\fBThank you\fR
|
1978
|
+
.sp
|
1979
|
+
.RS 4
|
1980
|
+
.ie n \{\
|
1981
|
+
\h'-04'\(bu\h'+03'\c
|
1982
|
+
.\}
|
1983
|
+
.el \{\
|
1984
|
+
.sp -1
|
1985
|
+
.IP \(bu 2.3
|
1986
|
+
.\}
|
1987
|
+
Gavin Sinclair inspired me to work on this project again!
|
1988
|
+
.RE
|
1989
|
+
.PP
|
1990
|
+
\fBIncompatible changes\fR
|
1991
|
+
.sp
|
1992
|
+
.RS 4
|
1993
|
+
.ie n \{\
|
1994
|
+
\h'-04'\(bu\h'+03'\c
|
1995
|
+
.\}
|
1996
|
+
.el \{\
|
1997
|
+
.sp -1
|
1998
|
+
.IP \(bu 2.3
|
1999
|
+
.\}
|
2000
|
+
Rename project from "Dfect" to "DIFECTS", which stands for:
|
2001
|
+
.sp
|
2002
|
+
\fBD\fRescribe,
|
2003
|
+
\fBI\fRnform,
|
2004
|
+
\fBF\fRalse,
|
2005
|
+
\fBE\fRrror,
|
2006
|
+
\fBC\fRatch,
|
2007
|
+
\fBT\fRrue,
|
2008
|
+
\fBS\fRhare
|
2009
|
+
.RE
|
2010
|
+
.sp
|
2011
|
+
.RS 4
|
2012
|
+
.ie n \{\
|
2013
|
+
\h'-04'\(bu\h'+03'\c
|
2014
|
+
.\}
|
2015
|
+
.el \{\
|
2016
|
+
.sp -1
|
2017
|
+
.IP \(bu 2.3
|
2018
|
+
.\}
|
2019
|
+
Remove
|
2020
|
+
[ruby-debug]
|
2021
|
+
integration because it is only helpful if you run a program inside it from the very start! That is, you cannot start ruby\-debug in the middle of a program and expect it to know about the call stack that lead up to that point in the program\&. Instead, we now use IRB to inspect program state at the point of failure only\&.
|
2022
|
+
.RE
|
2023
|
+
.sp
|
2024
|
+
.RS 4
|
2025
|
+
.ie n \{\
|
2026
|
+
\h'-04'\(bu\h'+03'\c
|
2027
|
+
.\}
|
2028
|
+
.el \{\
|
2029
|
+
.sp -1
|
2030
|
+
.IP \(bu 2.3
|
2031
|
+
.\}
|
2032
|
+
Remove
|
2033
|
+
\-\-quiet
|
2034
|
+
option because user can pipe to /dev/null instead\&.
|
2035
|
+
.RE
|
2036
|
+
.sp
|
2037
|
+
.RS 4
|
2038
|
+
.ie n \{\
|
2039
|
+
\h'-04'\(bu\h'+03'\c
|
2040
|
+
.\}
|
2041
|
+
.el \{\
|
2042
|
+
.sp -1
|
2043
|
+
.IP \(bu 2.3
|
2044
|
+
.\}
|
2045
|
+
Rename
|
2046
|
+
run()
|
2047
|
+
to
|
2048
|
+
start()
|
2049
|
+
to better complement
|
2050
|
+
stop()\&. The
|
2051
|
+
run()
|
2052
|
+
method no longer clears test results; use
|
2053
|
+
reset()
|
2054
|
+
for that\&.
|
2055
|
+
.RE
|
2056
|
+
.sp
|
2057
|
+
.RS 4
|
2058
|
+
.ie n \{\
|
2059
|
+
\h'-04'\(bu\h'+03'\c
|
2060
|
+
.\}
|
2061
|
+
.el \{\
|
2062
|
+
.sp -1
|
2063
|
+
.IP \(bu 2.3
|
2064
|
+
.\}
|
2065
|
+
Rename
|
2066
|
+
L()
|
2067
|
+
to
|
2068
|
+
I()
|
2069
|
+
as in "inform" the user\&.
|
2070
|
+
.RE
|
2071
|
+
.sp
|
2072
|
+
.RS 4
|
2073
|
+
.ie n \{\
|
2074
|
+
\h'-04'\(bu\h'+03'\c
|
2075
|
+
.\}
|
2076
|
+
.el \{\
|
2077
|
+
.sp -1
|
2078
|
+
.IP \(bu 2.3
|
2079
|
+
.\}
|
2080
|
+
Replace
|
2081
|
+
options()
|
2082
|
+
with
|
2083
|
+
debug()\&.
|
2084
|
+
.RE
|
2085
|
+
.sp
|
2086
|
+
.RS 4
|
2087
|
+
.ie n \{\
|
2088
|
+
\h'-04'\(bu\h'+03'\c
|
2089
|
+
.\}
|
2090
|
+
.el \{\
|
2091
|
+
.sp -1
|
2092
|
+
.IP \(bu 2.3
|
2093
|
+
.\}
|
2094
|
+
Replace
|
2095
|
+
report()
|
2096
|
+
with
|
2097
|
+
trace()
|
2098
|
+
and
|
2099
|
+
stats()\&.
|
2100
|
+
.RE
|
2101
|
+
.sp
|
2102
|
+
.RS 4
|
2103
|
+
.ie n \{\
|
2104
|
+
\h'-04'\(bu\h'+03'\c
|
2105
|
+
.\}
|
2106
|
+
.el \{\
|
2107
|
+
.sp -1
|
2108
|
+
.IP \(bu 2.3
|
2109
|
+
.\}
|
2110
|
+
Rename the
|
2111
|
+
difects/full
|
2112
|
+
library to
|
2113
|
+
difects/long\&.
|
2114
|
+
.RE
|
2115
|
+
.sp
|
2116
|
+
.RS 4
|
2117
|
+
.ie n \{\
|
2118
|
+
\h'-04'\(bu\h'+03'\c
|
2119
|
+
.\}
|
2120
|
+
.el \{\
|
2121
|
+
.sp -1
|
2122
|
+
.IP \(bu 2.3
|
2123
|
+
.\}
|
2124
|
+
Do not report instance variables in assertion failures\&.
|
2125
|
+
.RE
|
2126
|
+
.PP
|
2127
|
+
\fBNew features\fR
|
2128
|
+
.sp
|
2129
|
+
.RS 4
|
2130
|
+
.ie n \{\
|
2131
|
+
\h'-04'\(bu\h'+03'\c
|
2132
|
+
.\}
|
2133
|
+
.el \{\
|
2134
|
+
.sp -1
|
2135
|
+
.IP \(bu 2.3
|
2136
|
+
.\}
|
2137
|
+
Improve debuggability by tracking the bindings of all lines of code executed leading up to the point of failure using Ruby\(cqs awesome
|
2138
|
+
set_trace_func
|
2139
|
+
facility\&.
|
2140
|
+
.sp
|
2141
|
+
This allows block\-less assertions to be debugged with the same level of accuracy as normal block\-given assertions:
|
2142
|
+
.sp
|
2143
|
+
.if n \{\
|
2144
|
+
.RS 4
|
2145
|
+
.\}
|
2146
|
+
.nf
|
2147
|
+
x = 1
|
2148
|
+
y = 3
|
2149
|
+
T { x == y } # a block\-given assertion
|
2150
|
+
T x == y # a block\-less assertion
|
2151
|
+
.fi
|
2152
|
+
.if n \{\
|
2153
|
+
.RE
|
2154
|
+
.\}
|
2155
|
+
.sp
|
2156
|
+
In both cases, you will be able to inspect the local variables x and y!
|
2157
|
+
.RE
|
2158
|
+
.sp
|
2159
|
+
.RS 4
|
2160
|
+
.ie n \{\
|
2161
|
+
\h'-04'\(bu\h'+03'\c
|
2162
|
+
.\}
|
2163
|
+
.el \{\
|
2164
|
+
.sp -1
|
2165
|
+
.IP \(bu 2.3
|
2166
|
+
.\}
|
2167
|
+
Add
|
2168
|
+
I!()
|
2169
|
+
method to start the interactive debugger anywhere in your tests\&.
|
2170
|
+
.RE
|
2171
|
+
.sp
|
2172
|
+
.RS 4
|
2173
|
+
.ie n \{\
|
2174
|
+
\h'-04'\(bu\h'+03'\c
|
2175
|
+
.\}
|
2176
|
+
.el \{\
|
2177
|
+
.sp -1
|
2178
|
+
.IP \(bu 2.3
|
2179
|
+
.\}
|
2180
|
+
Add
|
2181
|
+
reset()
|
2182
|
+
to manually clear previous test results\&.
|
2183
|
+
.RE
|
2184
|
+
.sp
|
2185
|
+
.RS 4
|
2186
|
+
.ie n \{\
|
2187
|
+
\h'-04'\(bu\h'+03'\c
|
2188
|
+
.\}
|
2189
|
+
.el \{\
|
2190
|
+
.sp -1
|
2191
|
+
.IP \(bu 2.3
|
2192
|
+
.\}
|
2193
|
+
Alias
|
2194
|
+
test()
|
2195
|
+
to
|
2196
|
+
D()
|
2197
|
+
in
|
2198
|
+
[Test::Unit]
|
2199
|
+
emulation layer\&.
|
2200
|
+
.RE
|
2201
|
+
.sp
|
2202
|
+
.RS 4
|
2203
|
+
.ie n \{\
|
2204
|
+
\h'-04'\(bu\h'+03'\c
|
2205
|
+
.\}
|
2206
|
+
.el \{\
|
2207
|
+
.sp -1
|
2208
|
+
.IP \(bu 2.3
|
2209
|
+
.\}
|
2210
|
+
Fallback to
|
2211
|
+
pp()
|
2212
|
+
if
|
2213
|
+
to_yaml()
|
2214
|
+
fails while reporting failures\&.
|
2215
|
+
.RE
|
2216
|
+
.sp
|
2217
|
+
.RS 4
|
2218
|
+
.ie n \{\
|
2219
|
+
\h'-04'\(bu\h'+03'\c
|
2220
|
+
.\}
|
2221
|
+
.el \{\
|
2222
|
+
.sp -1
|
2223
|
+
.IP \(bu 2.3
|
2224
|
+
.\}
|
2225
|
+
Use
|
2226
|
+
[OrderedHash]
|
2227
|
+
library in Ruby versions older than 1\&.9 for consistent presentation of information in assertion failures\&.
|
2228
|
+
.RE
|
2229
|
+
.sp
|
2230
|
+
.RS 4
|
2231
|
+
.ie n \{\
|
2232
|
+
\h'-04'\(bu\h'+03'\c
|
2233
|
+
.\}
|
2234
|
+
.el \{\
|
2235
|
+
.sp -1
|
2236
|
+
.IP \(bu 2.3
|
2237
|
+
.\}
|
2238
|
+
Show full failure details before starting debugger instead of omitting the backtrace and local variables listing\&.
|
2239
|
+
.RE
|
2240
|
+
.sp
|
2241
|
+
.RS 4
|
2242
|
+
.ie n \{\
|
2243
|
+
\h'-04'\(bu\h'+03'\c
|
2244
|
+
.\}
|
2245
|
+
.el \{\
|
2246
|
+
.sp -1
|
2247
|
+
.IP \(bu 2.3
|
2248
|
+
.\}
|
2249
|
+
Use PP to pretty\-print variable values in failure details\&.
|
2250
|
+
.RE
|
2251
|
+
.sp
|
2252
|
+
.RS 4
|
2253
|
+
.ie n \{\
|
2254
|
+
\h'-04'\(bu\h'+03'\c
|
2255
|
+
.\}
|
2256
|
+
.el \{\
|
2257
|
+
.sp -1
|
2258
|
+
.IP \(bu 2.3
|
2259
|
+
.\}
|
2260
|
+
Omit unavailable information from failure details\&.
|
2261
|
+
.RE
|
2262
|
+
.sp
|
2263
|
+
.RS 4
|
2264
|
+
.ie n \{\
|
2265
|
+
\h'-04'\(bu\h'+03'\c
|
2266
|
+
.\}
|
2267
|
+
.el \{\
|
2268
|
+
.sp -1
|
2269
|
+
.IP \(bu 2.3
|
2270
|
+
.\}
|
2271
|
+
Put backtrace above code listing and variables in failure details\&.
|
2272
|
+
.RE
|
2273
|
+
.sp
|
2274
|
+
.RS 4
|
2275
|
+
.ie n \{\
|
2276
|
+
\h'-04'\(bu\h'+03'\c
|
2277
|
+
.\}
|
2278
|
+
.el \{\
|
2279
|
+
.sp -1
|
2280
|
+
.IP \(bu 2.3
|
2281
|
+
.\}
|
2282
|
+
Prevent empty array leaf nodes in execution trace\&.
|
2283
|
+
.RE
|
2284
|
+
.PP
|
2285
|
+
\fBBug fixes\fR
|
2286
|
+
.sp
|
2287
|
+
.RS 4
|
2288
|
+
.ie n \{\
|
2289
|
+
\h'-04'\(bu\h'+03'\c
|
2290
|
+
.\}
|
2291
|
+
.el \{\
|
2292
|
+
.sp -1
|
2293
|
+
.IP \(bu 2.3
|
2294
|
+
.\}
|
2295
|
+
Make
|
2296
|
+
DIFECTS
|
2297
|
+
module\(cqs instance methods available as class methods\&.
|
2298
|
+
.RE
|
2299
|
+
.sp
|
2300
|
+
.RS 4
|
2301
|
+
.ie n \{\
|
2302
|
+
\h'-04'\(bu\h'+03'\c
|
2303
|
+
.\}
|
2304
|
+
.el \{\
|
2305
|
+
.sp -1
|
2306
|
+
.IP \(bu 2.3
|
2307
|
+
.\}
|
2308
|
+
Always display fail trace before entering debugger\&.
|
2309
|
+
.RE
|
2310
|
+
.sp
|
2311
|
+
.RS 4
|
2312
|
+
.ie n \{\
|
2313
|
+
\h'-04'\(bu\h'+03'\c
|
2314
|
+
.\}
|
2315
|
+
.el \{\
|
2316
|
+
.sp -1
|
2317
|
+
.IP \(bu 2.3
|
2318
|
+
.\}
|
2319
|
+
Always clear test execution internals after
|
2320
|
+
start()\&.
|
2321
|
+
.RE
|
2322
|
+
.sp
|
2323
|
+
.RS 4
|
2324
|
+
.ie n \{\
|
2325
|
+
\h'-04'\(bu\h'+03'\c
|
2326
|
+
.\}
|
2327
|
+
.el \{\
|
2328
|
+
.sp -1
|
2329
|
+
.IP \(bu 2.3
|
2330
|
+
.\}
|
2331
|
+
Prevent IRB re\-initialization errors when starting debugger\&.
|
2332
|
+
.RE
|
2333
|
+
.PP
|
2334
|
+
\fBHousekeeping\fR
|
2335
|
+
.sp
|
2336
|
+
.RS 4
|
2337
|
+
.ie n \{\
|
2338
|
+
\h'-04'\(bu\h'+03'\c
|
2339
|
+
.\}
|
2340
|
+
.el \{\
|
2341
|
+
.sp -1
|
2342
|
+
.IP \(bu 2.3
|
2343
|
+
.\}
|
2344
|
+
Clarify how to mix\-in modules inside insulated tests in the manual\&. Thanks to Gavin Sinclair for reporting this issue\&.
|
2345
|
+
.RE
|
2346
|
+
.sp
|
2347
|
+
.RS 4
|
2348
|
+
.ie n \{\
|
2349
|
+
\h'-04'\(bu\h'+03'\c
|
2350
|
+
.\}
|
2351
|
+
.el \{\
|
2352
|
+
.sp -1
|
2353
|
+
.IP \(bu 2.3
|
2354
|
+
.\}
|
2355
|
+
Document methods (with hyperlinks to the location in the source code where they are defined) provided by emulation layers in manual\&.
|
2356
|
+
.RE
|
2357
|
+
.sp
|
2358
|
+
.RS 4
|
2359
|
+
.ie n \{\
|
2360
|
+
\h'-04'\(bu\h'+03'\c
|
2361
|
+
.\}
|
2362
|
+
.el \{\
|
2363
|
+
.sp -1
|
2364
|
+
.IP \(bu 2.3
|
2365
|
+
.\}
|
2366
|
+
Talk about passing condition as first argument to
|
2367
|
+
T
|
2368
|
+
and
|
2369
|
+
F
|
2370
|
+
assertions and provide a code example in the manual\&.
|
2371
|
+
.RE
|
2372
|
+
.sp
|
2373
|
+
.RS 4
|
2374
|
+
.ie n \{\
|
2375
|
+
\h'-04'\(bu\h'+03'\c
|
2376
|
+
.\}
|
2377
|
+
.el \{\
|
2378
|
+
.sp -1
|
2379
|
+
.IP \(bu 2.3
|
2380
|
+
.\}
|
2381
|
+
Clean up the code and revise the manual\&. Yay!
|
2382
|
+
.RE
|
2383
|
+
.SS "Version 2\&.2\&.0 (2010\-04\-28)"
|
2384
|
+
.sp
|
2385
|
+
This release adds a UNIX manual page and a sub\-library for full method names\&.
|
2386
|
+
.PP
|
2387
|
+
\fBNew features\fR
|
2388
|
+
.sp
|
2389
|
+
.RS 4
|
2390
|
+
.ie n \{\
|
2391
|
+
\h'-04'\(bu\h'+03'\c
|
2392
|
+
.\}
|
2393
|
+
.el \{\
|
2394
|
+
.sp -1
|
2395
|
+
.IP \(bu 2.3
|
2396
|
+
.\}
|
2397
|
+
Add
|
2398
|
+
dfect/full
|
2399
|
+
sub\-library that provides full name aliases to Dfect\(cqs abbreviated vocabulary:
|
2400
|
+
.sp
|
2401
|
+
\fBD\fRescribe,
|
2402
|
+
\fBT\fRrue,
|
2403
|
+
\fBF\fRalse,
|
2404
|
+
\fBE\fRrror,
|
2405
|
+
\fBC\fRatch,
|
2406
|
+
\fBS\fRhare,
|
2407
|
+
\fBL\fRog
|
2408
|
+
.RE
|
2409
|
+
.sp
|
2410
|
+
.RS 4
|
2411
|
+
.ie n \{\
|
2412
|
+
\h'-04'\(bu\h'+03'\c
|
2413
|
+
.\}
|
2414
|
+
.el \{\
|
2415
|
+
.sp -1
|
2416
|
+
.IP \(bu 2.3
|
2417
|
+
.\}
|
2418
|
+
Run
|
2419
|
+
dfect \-\-help
|
2420
|
+
to see the UNIX manual page!
|
2421
|
+
.RE
|
2422
|
+
.PP
|
2423
|
+
\fBHousekeeping\fR
|
2424
|
+
.sp
|
2425
|
+
.RS 4
|
2426
|
+
.ie n \{\
|
2427
|
+
\h'-04'\(bu\h'+03'\c
|
2428
|
+
.\}
|
2429
|
+
.el \{\
|
2430
|
+
.sp -1
|
2431
|
+
.IP \(bu 2.3
|
2432
|
+
.\}
|
2433
|
+
Upgrade to Inochi 3\&.0\&.0 and revise the help manual\&.
|
2434
|
+
.RE
|
2435
|
+
.SS "Version 2\&.1\&.0 (2010\-03\-31)"
|
2436
|
+
.sp
|
2437
|
+
This release adds a command\-line test runner and performs some minor housekeeping\&.
|
2438
|
+
.PP
|
2439
|
+
\fBNew features\fR
|
2440
|
+
.sp
|
2441
|
+
.RS 4
|
2442
|
+
.ie n \{\
|
2443
|
+
\h'-04'\(bu\h'+03'\c
|
2444
|
+
.\}
|
2445
|
+
.el \{\
|
2446
|
+
.sp -1
|
2447
|
+
.IP \(bu 2.3
|
2448
|
+
.\}
|
2449
|
+
Add
|
2450
|
+
bin/dfect
|
2451
|
+
executable as command\-line interface to this library\&.
|
2452
|
+
.RE
|
2453
|
+
.PP
|
2454
|
+
\fBHousekeeping\fR
|
2455
|
+
.sp
|
2456
|
+
.RS 4
|
2457
|
+
.ie n \{\
|
2458
|
+
\h'-04'\(bu\h'+03'\c
|
2459
|
+
.\}
|
2460
|
+
.el \{\
|
2461
|
+
.sp -1
|
2462
|
+
.IP \(bu 2.3
|
2463
|
+
.\}
|
2464
|
+
Do not
|
2465
|
+
require \'rubygems\'
|
2466
|
+
before loading the "ruby\-debug" library\&.
|
2467
|
+
.RE
|
2468
|
+
.sp
|
2469
|
+
.RS 4
|
2470
|
+
.ie n \{\
|
2471
|
+
\h'-04'\(bu\h'+03'\c
|
2472
|
+
.\}
|
2473
|
+
.el \{\
|
2474
|
+
.sp -1
|
2475
|
+
.IP \(bu 2.3
|
2476
|
+
.\}
|
2477
|
+
Upgrade to Inochi 2\&.0\&.0\-rc2 for managing this project\&.
|
2478
|
+
.RE
|
2479
|
+
.SS "Version 2\&.0\&.0 (2010\-03\-21)"
|
2480
|
+
.sp
|
2481
|
+
This release adds the ability to insulate tests from each other, share code between them, makes the order of parameters consistent in the API, improves user interactivity, fixes some bugs, and revises the user manual\&.
|
2482
|
+
.PP
|
2483
|
+
\fBIncompatible changes\fR
|
2484
|
+
.sp
|
2485
|
+
.RS 4
|
2486
|
+
.ie n \{\
|
2487
|
+
\h'-04'\(bu\h'+03'\c
|
2488
|
+
.\}
|
2489
|
+
.el \{\
|
2490
|
+
.sp -1
|
2491
|
+
.IP \(bu 2.3
|
2492
|
+
.\}
|
2493
|
+
Root\-level calls to the
|
2494
|
+
Dfect::D()
|
2495
|
+
method are automatically insulated now\&.
|
2496
|
+
.RE
|
2497
|
+
.sp
|
2498
|
+
.RS 4
|
2499
|
+
.ie n \{\
|
2500
|
+
\h'-04'\(bu\h'+03'\c
|
2501
|
+
.\}
|
2502
|
+
.el \{\
|
2503
|
+
.sp -1
|
2504
|
+
.IP \(bu 2.3
|
2505
|
+
.\}
|
2506
|
+
The
|
2507
|
+
Dfect::E()
|
2508
|
+
methods now expects its optional message parameter to be the
|
2509
|
+
\fIlast parameter\fR
|
2510
|
+
in the parameter list\&.
|
2511
|
+
.RE
|
2512
|
+
.sp
|
2513
|
+
.RS 4
|
2514
|
+
.ie n \{\
|
2515
|
+
\h'-04'\(bu\h'+03'\c
|
2516
|
+
.\}
|
2517
|
+
.el \{\
|
2518
|
+
.sp -1
|
2519
|
+
.IP \(bu 2.3
|
2520
|
+
.\}
|
2521
|
+
The
|
2522
|
+
Dfect::C()
|
2523
|
+
methods now expect their first parameter to be a symbol instead of the optional message to be shown in case of assertion failure\&.
|
2524
|
+
.RE
|
2525
|
+
.sp
|
2526
|
+
.RS 4
|
2527
|
+
.ie n \{\
|
2528
|
+
\h'-04'\(bu\h'+03'\c
|
2529
|
+
.\}
|
2530
|
+
.el \{\
|
2531
|
+
.sp -1
|
2532
|
+
.IP \(bu 2.3
|
2533
|
+
.\}
|
2534
|
+
The
|
2535
|
+
Dfect::R()
|
2536
|
+
has been renamed to
|
2537
|
+
Dfect::L(), which is a mnemonic for "Logging"\&.
|
2538
|
+
.RE
|
2539
|
+
.sp
|
2540
|
+
.RS 4
|
2541
|
+
.ie n \{\
|
2542
|
+
\h'-04'\(bu\h'+03'\c
|
2543
|
+
.\}
|
2544
|
+
.el \{\
|
2545
|
+
.sp -1
|
2546
|
+
.IP \(bu 2.3
|
2547
|
+
.\}
|
2548
|
+
Shorten names of hash keys in the execution trace for brevity and rename
|
2549
|
+
:raise
|
2550
|
+
key in report statistics to
|
2551
|
+
:error\&.
|
2552
|
+
.RE
|
2553
|
+
.sp
|
2554
|
+
.RS 4
|
2555
|
+
.ie n \{\
|
2556
|
+
\h'-04'\(bu\h'+03'\c
|
2557
|
+
.\}
|
2558
|
+
.el \{\
|
2559
|
+
.sp -1
|
2560
|
+
.IP \(bu 2.3
|
2561
|
+
.\}
|
2562
|
+
Only the most helpful subset of the failure details is shown before placing the user into a debugger because they can query the omitted information (on demand) inside the debugger\&.
|
2563
|
+
.RE
|
2564
|
+
.sp
|
2565
|
+
.RS 4
|
2566
|
+
.ie n \{\
|
2567
|
+
\h'-04'\(bu\h'+03'\c
|
2568
|
+
.\}
|
2569
|
+
.el \{\
|
2570
|
+
.sp -1
|
2571
|
+
.IP \(bu 2.3
|
2572
|
+
.\}
|
2573
|
+
The execution trace is only shown if all tests passed in
|
2574
|
+
Dfect::run()\&.
|
2575
|
+
.RE
|
2576
|
+
.sp
|
2577
|
+
.RS 4
|
2578
|
+
.ie n \{\
|
2579
|
+
\h'-04'\(bu\h'+03'\c
|
2580
|
+
.\}
|
2581
|
+
.el \{\
|
2582
|
+
.sp -1
|
2583
|
+
.IP \(bu 2.3
|
2584
|
+
.\}
|
2585
|
+
The
|
2586
|
+
:debug
|
2587
|
+
option is now set to Ruby\(cqs
|
2588
|
+
$DEBUG
|
2589
|
+
global by default\&.
|
2590
|
+
.RE
|
2591
|
+
.PP
|
2592
|
+
\fBNew features\fR
|
2593
|
+
.sp
|
2594
|
+
.RS 4
|
2595
|
+
.ie n \{\
|
2596
|
+
\h'-04'\(bu\h'+03'\c
|
2597
|
+
.\}
|
2598
|
+
.el \{\
|
2599
|
+
.sp -1
|
2600
|
+
.IP \(bu 2.3
|
2601
|
+
.\}
|
2602
|
+
Print failures as they occur instead of waiting until the end\&.
|
2603
|
+
.RE
|
2604
|
+
.sp
|
2605
|
+
.RS 4
|
2606
|
+
.ie n \{\
|
2607
|
+
\h'-04'\(bu\h'+03'\c
|
2608
|
+
.\}
|
2609
|
+
.el \{\
|
2610
|
+
.sp -1
|
2611
|
+
.IP \(bu 2.3
|
2612
|
+
.\}
|
2613
|
+
Allow passing condition as argument to true/false assertions instead of requiring the condition to be passed as a code block, and also fall back to the binding of inner\-most enclosing test or hook when debugging or constructing a failure report for an assertion that was not given a block\&.
|
2614
|
+
.sp
|
2615
|
+
This allows you to reduce "line noise" in your tests:
|
2616
|
+
.sp
|
2617
|
+
.if n \{\
|
2618
|
+
.RS 4
|
2619
|
+
.\}
|
2620
|
+
.nf
|
2621
|
+
D "Lottery" do
|
2622
|
+
winning_ticket = rand()
|
2623
|
+
|
2624
|
+
D "My chances of winning" do
|
2625
|
+
my_ticket = rand()
|
2626
|
+
F my_ticket == winning_ticket, "I won?! Dream on\&."
|
2627
|
+
end
|
2628
|
+
end
|
2629
|
+
.fi
|
2630
|
+
.if n \{\
|
2631
|
+
.RE
|
2632
|
+
.\}
|
2633
|
+
.RE
|
2634
|
+
.sp
|
2635
|
+
.RS 4
|
2636
|
+
.ie n \{\
|
2637
|
+
\h'-04'\(bu\h'+03'\c
|
2638
|
+
.\}
|
2639
|
+
.el \{\
|
2640
|
+
.sp -1
|
2641
|
+
.IP \(bu 2.3
|
2642
|
+
.\}
|
2643
|
+
Add
|
2644
|
+
Dfect::S()
|
2645
|
+
methods for sharing code between tests\&.
|
2646
|
+
.RE
|
2647
|
+
.sp
|
2648
|
+
.RS 4
|
2649
|
+
.ie n \{\
|
2650
|
+
\h'-04'\(bu\h'+03'\c
|
2651
|
+
.\}
|
2652
|
+
.el \{\
|
2653
|
+
.sp -1
|
2654
|
+
.IP \(bu 2.3
|
2655
|
+
.\}
|
2656
|
+
Add
|
2657
|
+
Dfect::D!()
|
2658
|
+
method to explicitly insulate a test from other tests, the top\-level Ruby environment, and the code being tested\&.
|
2659
|
+
.RE
|
2660
|
+
.sp
|
2661
|
+
.RS 4
|
2662
|
+
.ie n \{\
|
2663
|
+
\h'-04'\(bu\h'+03'\c
|
2664
|
+
.\}
|
2665
|
+
.el \{\
|
2666
|
+
.sp -1
|
2667
|
+
.IP \(bu 2.3
|
2668
|
+
.\}
|
2669
|
+
Add
|
2670
|
+
Dfect::info()
|
2671
|
+
method which returns the details of the failure that is currently being debugged by the user\&.
|
2672
|
+
.RE
|
2673
|
+
.sp
|
2674
|
+
.RS 4
|
2675
|
+
.ie n \{\
|
2676
|
+
\h'-04'\(bu\h'+03'\c
|
2677
|
+
.\}
|
2678
|
+
.el \{\
|
2679
|
+
.sp -1
|
2680
|
+
.IP \(bu 2.3
|
2681
|
+
.\}
|
2682
|
+
Add instance variables to the
|
2683
|
+
:vars
|
2684
|
+
section of a failure report\&.
|
2685
|
+
.RE
|
2686
|
+
.sp
|
2687
|
+
.RS 4
|
2688
|
+
.ie n \{\
|
2689
|
+
\h'-04'\(bu\h'+03'\c
|
2690
|
+
.\}
|
2691
|
+
.el \{\
|
2692
|
+
.sp -1
|
2693
|
+
.IP \(bu 2.3
|
2694
|
+
.\}
|
2695
|
+
Add
|
2696
|
+
setup!()
|
2697
|
+
and
|
2698
|
+
teardown!()
|
2699
|
+
methods for before\-all and after\-all hooks in the dfect/unit emulation library\&.
|
2700
|
+
.RE
|
2701
|
+
.sp
|
2702
|
+
.RS 4
|
2703
|
+
.ie n \{\
|
2704
|
+
\h'-04'\(bu\h'+03'\c
|
2705
|
+
.\}
|
2706
|
+
.el \{\
|
2707
|
+
.sp -1
|
2708
|
+
.IP \(bu 2.3
|
2709
|
+
.\}
|
2710
|
+
Add test execution time to statistics hash (under the
|
2711
|
+
:time
|
2712
|
+
key)\&.
|
2713
|
+
.RE
|
2714
|
+
.PP
|
2715
|
+
\fBBug fixes\fR
|
2716
|
+
.sp
|
2717
|
+
.RS 4
|
2718
|
+
.ie n \{\
|
2719
|
+
\h'-04'\(bu\h'+03'\c
|
2720
|
+
.\}
|
2721
|
+
.el \{\
|
2722
|
+
.sp -1
|
2723
|
+
.IP \(bu 2.3
|
2724
|
+
.\}
|
2725
|
+
Do not print any output when
|
2726
|
+
:quiet
|
2727
|
+
option is active\&.
|
2728
|
+
.RE
|
2729
|
+
.sp
|
2730
|
+
.RS 4
|
2731
|
+
.ie n \{\
|
2732
|
+
\h'-04'\(bu\h'+03'\c
|
2733
|
+
.\}
|
2734
|
+
.el \{\
|
2735
|
+
.sp -1
|
2736
|
+
.IP \(bu 2.3
|
2737
|
+
.\}
|
2738
|
+
Allow passing multiple strings/objects to
|
2739
|
+
Dfect::D()
|
2740
|
+
like in RSpec\&.
|
2741
|
+
.RE
|
2742
|
+
.sp
|
2743
|
+
.RS 4
|
2744
|
+
.ie n \{\
|
2745
|
+
\h'-04'\(bu\h'+03'\c
|
2746
|
+
.\}
|
2747
|
+
.el \{\
|
2748
|
+
.sp -1
|
2749
|
+
.IP \(bu 2.3
|
2750
|
+
.\}
|
2751
|
+
Make before and after hook methods mixin\-able like assertions\&.
|
2752
|
+
.RE
|
2753
|
+
.sp
|
2754
|
+
.RS 4
|
2755
|
+
.ie n \{\
|
2756
|
+
\h'-04'\(bu\h'+03'\c
|
2757
|
+
.\}
|
2758
|
+
.el \{\
|
2759
|
+
.sp -1
|
2760
|
+
.IP \(bu 2.3
|
2761
|
+
.\}
|
2762
|
+
Do not assume that
|
2763
|
+
Module#to_s
|
2764
|
+
is the same as
|
2765
|
+
Module#name\&.
|
2766
|
+
.RE
|
2767
|
+
.PP
|
2768
|
+
\fBHousekeeping\fR
|
2769
|
+
.sp
|
2770
|
+
.RS 4
|
2771
|
+
.ie n \{\
|
2772
|
+
\h'-04'\(bu\h'+03'\c
|
2773
|
+
.\}
|
2774
|
+
.el \{\
|
2775
|
+
.sp -1
|
2776
|
+
.IP \(bu 2.3
|
2777
|
+
.\}
|
2778
|
+
Upgrade to Inochi 2\&.0\&.0\-rc1 for managing this project\&.
|
2779
|
+
.RE
|
2780
|
+
.sp
|
2781
|
+
.RS 4
|
2782
|
+
.ie n \{\
|
2783
|
+
\h'-04'\(bu\h'+03'\c
|
2784
|
+
.\}
|
2785
|
+
.el \{\
|
2786
|
+
.sp -1
|
2787
|
+
.IP \(bu 2.3
|
2788
|
+
.\}
|
2789
|
+
Make emulation libraries modify Dfect module instead of Kernel\&.
|
2790
|
+
.RE
|
2791
|
+
.sp
|
2792
|
+
.RS 4
|
2793
|
+
.ie n \{\
|
2794
|
+
\h'-04'\(bu\h'+03'\c
|
2795
|
+
.\}
|
2796
|
+
.el \{\
|
2797
|
+
.sp -1
|
2798
|
+
.IP \(bu 2.3
|
2799
|
+
.\}
|
2800
|
+
Do not pollute the user\(cqs output with our
|
2801
|
+
Class#to_yaml
|
2802
|
+
workaround\&.
|
2803
|
+
.RE
|
2804
|
+
.sp
|
2805
|
+
.RS 4
|
2806
|
+
.ie n \{\
|
2807
|
+
\h'-04'\(bu\h'+03'\c
|
2808
|
+
.\}
|
2809
|
+
.el \{\
|
2810
|
+
.sp -1
|
2811
|
+
.IP \(bu 2.3
|
2812
|
+
.\}
|
2813
|
+
Remove "Motivation" section from user manual\&. It was too fanatic!
|
2814
|
+
.RE
|
2815
|
+
.SS "Version 1\&.1\&.0 (2009\-10\-27)"
|
2816
|
+
.sp
|
2817
|
+
This release adds a new method for emitting status messages and does some internal housekeeping\&.
|
2818
|
+
.PP
|
2819
|
+
\fBThank you\fR
|
2820
|
+
.sp
|
2821
|
+
.RS 4
|
2822
|
+
.ie n \{\
|
2823
|
+
\h'-04'\(bu\h'+03'\c
|
2824
|
+
.\}
|
2825
|
+
.el \{\
|
2826
|
+
.sp -1
|
2827
|
+
.IP \(bu 2.3
|
2828
|
+
.\}
|
2829
|
+
Iñaki Baz Castillo used Dfect and suggested new features\&.
|
2830
|
+
.RE
|
2831
|
+
.PP
|
2832
|
+
\fBNew features\fR
|
2833
|
+
.sp
|
2834
|
+
.RS 4
|
2835
|
+
.ie n \{\
|
2836
|
+
\h'-04'\(bu\h'+03'\c
|
2837
|
+
.\}
|
2838
|
+
.el \{\
|
2839
|
+
.sp -1
|
2840
|
+
.IP \(bu 2.3
|
2841
|
+
.\}
|
2842
|
+
Add
|
2843
|
+
Dfect::S()
|
2844
|
+
method for adding status messages to the execution report\&.
|
2845
|
+
This feature was requested
|
2846
|
+
by Iñaki Baz Castillo\&.
|
2847
|
+
.RE
|
2848
|
+
.PP
|
2849
|
+
\fBHousekeeping\fR
|
2850
|
+
.sp
|
2851
|
+
.RS 4
|
2852
|
+
.ie n \{\
|
2853
|
+
\h'-04'\(bu\h'+03'\c
|
2854
|
+
.\}
|
2855
|
+
.el \{\
|
2856
|
+
.sp -1
|
2857
|
+
.IP \(bu 2.3
|
2858
|
+
.\}
|
2859
|
+
Remove unused require of
|
2860
|
+
delegate
|
2861
|
+
standard library in
|
2862
|
+
dfect/spec
|
2863
|
+
RSpec emulation layer\&.
|
2864
|
+
.RE
|
2865
|
+
.sp
|
2866
|
+
.RS 4
|
2867
|
+
.ie n \{\
|
2868
|
+
\h'-04'\(bu\h'+03'\c
|
2869
|
+
.\}
|
2870
|
+
.el \{\
|
2871
|
+
.sp -1
|
2872
|
+
.IP \(bu 2.3
|
2873
|
+
.\}
|
2874
|
+
Mention emulation layers for popular testing libraries\&.
|
2875
|
+
.RE
|
2876
|
+
.sp
|
2877
|
+
.RS 4
|
2878
|
+
.ie n \{\
|
2879
|
+
\h'-04'\(bu\h'+03'\c
|
2880
|
+
.\}
|
2881
|
+
.el \{\
|
2882
|
+
.sp -1
|
2883
|
+
.IP \(bu 2.3
|
2884
|
+
.\}
|
2885
|
+
Mention that assertions take an optional message parameter\&.
|
2886
|
+
.RE
|
2887
|
+
.sp
|
2888
|
+
.RS 4
|
2889
|
+
.ie n \{\
|
2890
|
+
\h'-04'\(bu\h'+03'\c
|
2891
|
+
.\}
|
2892
|
+
.el \{\
|
2893
|
+
.sp -1
|
2894
|
+
.IP \(bu 2.3
|
2895
|
+
.\}
|
2896
|
+
Replace sample unit test with Dfect test suite\&.
|
2897
|
+
.RE
|
2898
|
+
.sp
|
2899
|
+
.RS 4
|
2900
|
+
.ie n \{\
|
2901
|
+
\h'-04'\(bu\h'+03'\c
|
2902
|
+
.\}
|
2903
|
+
.el \{\
|
2904
|
+
.sp -1
|
2905
|
+
.IP \(bu 2.3
|
2906
|
+
.\}
|
2907
|
+
Upgrade user manual to ERBook 9\&.0\&.0\&.
|
2908
|
+
.RE
|
2909
|
+
.SS "Version 1\&.0\&.1 (2009\-10\-07)"
|
2910
|
+
.sp
|
2911
|
+
This release fixes a bug in the [Test::Unit] emulation library and revises the user manual\&.
|
2912
|
+
.PP
|
2913
|
+
\fBBug fixes\fR
|
2914
|
+
.sp
|
2915
|
+
.RS 4
|
2916
|
+
.ie n \{\
|
2917
|
+
\h'-04'\(bu\h'+03'\c
|
2918
|
+
.\}
|
2919
|
+
.el \{\
|
2920
|
+
.sp -1
|
2921
|
+
.IP \(bu 2.3
|
2922
|
+
.\}
|
2923
|
+
The parameters for the
|
2924
|
+
assert_equal()
|
2925
|
+
method in the dfect/unit library were in the wrong order\&.
|
2926
|
+
.RE
|
2927
|
+
.PP
|
2928
|
+
\fBHousekeeping\fR
|
2929
|
+
.sp
|
2930
|
+
.RS 4
|
2931
|
+
.ie n \{\
|
2932
|
+
\h'-04'\(bu\h'+03'\c
|
2933
|
+
.\}
|
2934
|
+
.el \{\
|
2935
|
+
.sp -1
|
2936
|
+
.IP \(bu 2.3
|
2937
|
+
.\}
|
2938
|
+
Revise user manual to better fit jQuery UI tabs\&.
|
2939
|
+
.RE
|
2940
|
+
.sp
|
2941
|
+
.RS 4
|
2942
|
+
.ie n \{\
|
2943
|
+
\h'-04'\(bu\h'+03'\c
|
2944
|
+
.\}
|
2945
|
+
.el \{\
|
2946
|
+
.sp -1
|
2947
|
+
.IP \(bu 2.3
|
2948
|
+
.\}
|
2949
|
+
Justify the use of
|
2950
|
+
eval()
|
2951
|
+
in emulation libraries\&.
|
2952
|
+
.RE
|
2953
|
+
.sp
|
2954
|
+
.RS 4
|
2955
|
+
.ie n \{\
|
2956
|
+
\h'-04'\(bu\h'+03'\c
|
2957
|
+
.\}
|
2958
|
+
.el \{\
|
2959
|
+
.sp -1
|
2960
|
+
.IP \(bu 2.3
|
2961
|
+
.\}
|
2962
|
+
Use simpler Copyright reminder at the top of every file\&.
|
2963
|
+
.RE
|
2964
|
+
.sp
|
2965
|
+
.RS 4
|
2966
|
+
.ie n \{\
|
2967
|
+
\h'-04'\(bu\h'+03'\c
|
2968
|
+
.\}
|
2969
|
+
.el \{\
|
2970
|
+
.sp -1
|
2971
|
+
.IP \(bu 2.3
|
2972
|
+
.\}
|
2973
|
+
Make SLOC count in user manual reflect the
|
2974
|
+
\fIcore\fR
|
2975
|
+
library only\&.
|
2976
|
+
.RE
|
2977
|
+
.sp
|
2978
|
+
.RS 4
|
2979
|
+
.ie n \{\
|
2980
|
+
\h'-04'\(bu\h'+03'\c
|
2981
|
+
.\}
|
2982
|
+
.el \{\
|
2983
|
+
.sp -1
|
2984
|
+
.IP \(bu 2.3
|
2985
|
+
.\}
|
2986
|
+
Mark code spans with
|
2987
|
+
{:lang=ruby}
|
2988
|
+
instead of HTML
|
2989
|
+
<code/>
|
2990
|
+
tags\&.
|
2991
|
+
.RE
|
2992
|
+
.sp
|
2993
|
+
.RS 4
|
2994
|
+
.ie n \{\
|
2995
|
+
\h'-04'\(bu\h'+03'\c
|
2996
|
+
.\}
|
2997
|
+
.el \{\
|
2998
|
+
.sp -1
|
2999
|
+
.IP \(bu 2.3
|
3000
|
+
.\}
|
3001
|
+
Open source is for fun, so
|
3002
|
+
be nice
|
3003
|
+
and speak of "related works" instead of "competitors"\&.
|
3004
|
+
.RE
|
3005
|
+
.SS "Version 1\&.0\&.0 (2009\-05\-03)"
|
3006
|
+
.sp
|
3007
|
+
This release improves default choices, adds emulation layers to mimic other testing libraries, and fixes some bugs\&.
|
3008
|
+
.PP
|
3009
|
+
\fBIncompatible changes\fR
|
3010
|
+
.sp
|
3011
|
+
.RS 4
|
3012
|
+
.ie n \{\
|
3013
|
+
\h'-04'\(bu\h'+03'\c
|
3014
|
+
.\}
|
3015
|
+
.el \{\
|
3016
|
+
.sp -1
|
3017
|
+
.IP \(bu 2.3
|
3018
|
+
.\}
|
3019
|
+
The
|
3020
|
+
:debug
|
3021
|
+
option is now enabled by default and is no longer linked to the value of
|
3022
|
+
$DEBUG\&.
|
3023
|
+
.RE
|
3024
|
+
.sp
|
3025
|
+
.RS 4
|
3026
|
+
.ie n \{\
|
3027
|
+
\h'-04'\(bu\h'+03'\c
|
3028
|
+
.\}
|
3029
|
+
.el \{\
|
3030
|
+
.sp -1
|
3031
|
+
.IP \(bu 2.3
|
3032
|
+
.\}
|
3033
|
+
|
3034
|
+
Dfect\&.run()
|
3035
|
+
now appends to previous results by default\&. This behavior can be disabled by passing
|
3036
|
+
false
|
3037
|
+
to the method\&.
|
3038
|
+
.RE
|
3039
|
+
.PP
|
3040
|
+
\fBNew features\fR
|
3041
|
+
.sp
|
3042
|
+
.RS 4
|
3043
|
+
.ie n \{\
|
3044
|
+
\h'-04'\(bu\h'+03'\c
|
3045
|
+
.\}
|
3046
|
+
.el \{\
|
3047
|
+
.sp -1
|
3048
|
+
.IP \(bu 2.3
|
3049
|
+
.\}
|
3050
|
+
Add emulation layers to mimic other testing libraries:
|
3051
|
+
.TS
|
3052
|
+
tab(:);
|
3053
|
+
lt lt
|
3054
|
+
lt lt
|
3055
|
+
lt lt.
|
3056
|
+
T{
|
3057
|
+
dfect/unit
|
3058
|
+
T}:T{
|
3059
|
+
[Test::Unit]
|
3060
|
+
emulation layer
|
3061
|
+
T}
|
3062
|
+
T{
|
3063
|
+
dfect/mini
|
3064
|
+
T}:T{
|
3065
|
+
[Minitest]
|
3066
|
+
emulation layer
|
3067
|
+
T}
|
3068
|
+
T{
|
3069
|
+
dfect/spec
|
3070
|
+
T}:T{
|
3071
|
+
[RSpec]
|
3072
|
+
emulation layer
|
3073
|
+
T}
|
3074
|
+
.TE
|
3075
|
+
.sp 1
|
3076
|
+
.RE
|
3077
|
+
.PP
|
3078
|
+
\fBBug fixes\fR
|
3079
|
+
.sp
|
3080
|
+
.RS 4
|
3081
|
+
.ie n \{\
|
3082
|
+
\h'-04'\(bu\h'+03'\c
|
3083
|
+
.\}
|
3084
|
+
.el \{\
|
3085
|
+
.sp -1
|
3086
|
+
.IP \(bu 2.3
|
3087
|
+
.\}
|
3088
|
+
Do not blindly replace
|
3089
|
+
Class#to_yaml; it might be fixed someday\&.
|
3090
|
+
.RE
|
3091
|
+
.PP
|
3092
|
+
\fBHousekeeping\fR
|
3093
|
+
.sp
|
3094
|
+
.RS 4
|
3095
|
+
.ie n \{\
|
3096
|
+
\h'-04'\(bu\h'+03'\c
|
3097
|
+
.\}
|
3098
|
+
.el \{\
|
3099
|
+
.sp -1
|
3100
|
+
.IP \(bu 2.3
|
3101
|
+
.\}
|
3102
|
+
Add "Motivation" section in user manual to promote interactive debugging\&.
|
3103
|
+
.RE
|
3104
|
+
.sp
|
3105
|
+
.RS 4
|
3106
|
+
.ie n \{\
|
3107
|
+
\h'-04'\(bu\h'+03'\c
|
3108
|
+
.\}
|
3109
|
+
.el \{\
|
3110
|
+
.sp -1
|
3111
|
+
.IP \(bu 2.3
|
3112
|
+
.\}
|
3113
|
+
Add brief History of this project\(cqs inception\&.
|
3114
|
+
.RE
|
3115
|
+
.sp
|
3116
|
+
.RS 4
|
3117
|
+
.ie n \{\
|
3118
|
+
\h'-04'\(bu\h'+03'\c
|
3119
|
+
.\}
|
3120
|
+
.el \{\
|
3121
|
+
.sp -1
|
3122
|
+
.IP \(bu 2.3
|
3123
|
+
.\}
|
3124
|
+
Remove redundant assertions for F!() and T!() methods in test suite\&.
|
3125
|
+
.RE
|
3126
|
+
.sp
|
3127
|
+
.RS 4
|
3128
|
+
.ie n \{\
|
3129
|
+
\h'-04'\(bu\h'+03'\c
|
3130
|
+
.\}
|
3131
|
+
.el \{\
|
3132
|
+
.sp -1
|
3133
|
+
.IP \(bu 2.3
|
3134
|
+
.\}
|
3135
|
+
Add copyright notice at the top of every file\&.
|
3136
|
+
.RE
|
3137
|
+
.SS "Version 0\&.1\&.0 (2009\-04\-28)"
|
3138
|
+
.sp
|
3139
|
+
This release adds new variations to assertion methods, fixes several bugs, and improves test coverage\&.
|
3140
|
+
.PP
|
3141
|
+
\fBThank you\fR
|
3142
|
+
.sp
|
3143
|
+
.RS 4
|
3144
|
+
.ie n \{\
|
3145
|
+
\h'-04'\(bu\h'+03'\c
|
3146
|
+
.\}
|
3147
|
+
.el \{\
|
3148
|
+
.sp -1
|
3149
|
+
.IP \(bu 2.3
|
3150
|
+
.\}
|
3151
|
+
François Beausoleil contributed patches for both code
|
3152
|
+
\fIand\fR
|
3153
|
+
tests! :\-)
|
3154
|
+
.RE
|
3155
|
+
.PP
|
3156
|
+
\fBNew features\fR
|
3157
|
+
.sp
|
3158
|
+
.RS 4
|
3159
|
+
.ie n \{\
|
3160
|
+
\h'-04'\(bu\h'+03'\c
|
3161
|
+
.\}
|
3162
|
+
.el \{\
|
3163
|
+
.sp -1
|
3164
|
+
.IP \(bu 2.3
|
3165
|
+
.\}
|
3166
|
+
Added negation (m!) and sampling (m?) variations to normal assertion methods\&. These new methods implement assertion functionality missing so far (previously we could not assert that a given exception was NOT thrown) and thereby allow us to fully test Dfect using itself\&.
|
3167
|
+
.RE
|
3168
|
+
.sp
|
3169
|
+
.RS 4
|
3170
|
+
.ie n \{\
|
3171
|
+
\h'-04'\(bu\h'+03'\c
|
3172
|
+
.\}
|
3173
|
+
.el \{\
|
3174
|
+
.sp -1
|
3175
|
+
.IP \(bu 2.3
|
3176
|
+
.\}
|
3177
|
+
Added documentation on how to insulate tests from the global Ruby namespace\&.
|
3178
|
+
.RE
|
3179
|
+
.PP
|
3180
|
+
\fBBug fixes\fR
|
3181
|
+
.sp
|
3182
|
+
.RS 4
|
3183
|
+
.ie n \{\
|
3184
|
+
\h'-04'\(bu\h'+03'\c
|
3185
|
+
.\}
|
3186
|
+
.el \{\
|
3187
|
+
.sp -1
|
3188
|
+
.IP \(bu 2.3
|
3189
|
+
.\}
|
3190
|
+
The
|
3191
|
+
E()
|
3192
|
+
method did not consider the case where a block does not raise anything as a failure\&. Thanks to François Beausoleil for reporting this\&.
|
3193
|
+
.RE
|
3194
|
+
.sp
|
3195
|
+
.RS 4
|
3196
|
+
.ie n \{\
|
3197
|
+
\h'-04'\(bu\h'+03'\c
|
3198
|
+
.\}
|
3199
|
+
.el \{\
|
3200
|
+
.sp -1
|
3201
|
+
.IP \(bu 2.3
|
3202
|
+
.\}
|
3203
|
+
When creating a report about an assertion failure, an exception would be thrown if any local variables pointed to an empty array\&.
|
3204
|
+
.RE
|
3205
|
+
.sp
|
3206
|
+
.RS 4
|
3207
|
+
.ie n \{\
|
3208
|
+
\h'-04'\(bu\h'+03'\c
|
3209
|
+
.\}
|
3210
|
+
.el \{\
|
3211
|
+
.sp -1
|
3212
|
+
.IP \(bu 2.3
|
3213
|
+
.\}
|
3214
|
+
The
|
3215
|
+
Dfect::<()
|
3216
|
+
method broke the inheritance\-checking behavior of the < class method\&. I added a bypass to the originial behavior so that
|
3217
|
+
RCov::XX
|
3218
|
+
can properly generate a report about code that uses Dfect\&.
|
3219
|
+
.RE
|
3220
|
+
.sp
|
3221
|
+
.RS 4
|
3222
|
+
.ie n \{\
|
3223
|
+
\h'-04'\(bu\h'+03'\c
|
3224
|
+
.\}
|
3225
|
+
.el \{\
|
3226
|
+
.sp -1
|
3227
|
+
.IP \(bu 2.3
|
3228
|
+
.\}
|
3229
|
+
Added workaround for YAML error that occurs when serializing a class object:
|
3230
|
+
.sp
|
3231
|
+
.if n \{\
|
3232
|
+
.RS 4
|
3233
|
+
.\}
|
3234
|
+
.nf
|
3235
|
+
TypeError: can\'t dump anonymous class Class
|
3236
|
+
.fi
|
3237
|
+
.if n \{\
|
3238
|
+
.RE
|
3239
|
+
.\}
|
3240
|
+
.RE
|
3241
|
+
.PP
|
3242
|
+
\fBHousekeeping\fR
|
3243
|
+
.sp
|
3244
|
+
.RS 4
|
3245
|
+
.ie n \{\
|
3246
|
+
\h'-04'\(bu\h'+03'\c
|
3247
|
+
.\}
|
3248
|
+
.el \{\
|
3249
|
+
.sp -1
|
3250
|
+
.IP \(bu 2.3
|
3251
|
+
.\}
|
3252
|
+
Filled the big holes in test coverage\&. Everything except the runtime debugging logic is now covered by the unit tests\&.
|
3253
|
+
.RE
|
3254
|
+
.SS "Version 0\&.0\&.0 (2009\-04\-13)"
|
3255
|
+
.sp
|
3256
|
+
For the longest time, I took [Test::Unit] and [RSpec] for granted\&. They were the epitomy of modern Ruby practice; the insurmountable status quo; immortalized in books, conferences, and blogs alike\&.
|
3257
|
+
.sp
|
3258
|
+
Why would \fIanyone\fR think of using anything remotely different, let alone be foolish enough to write an alternative testing library when these are clearly "good enough"?
|
3259
|
+
.sp
|
3260
|
+
Recent experiments in assertion testing libraries smashed my world view:
|
3261
|
+
.sp
|
3262
|
+
.RS 4
|
3263
|
+
.ie n \{\
|
3264
|
+
\h'-04'\(bu\h'+03'\c
|
3265
|
+
.\}
|
3266
|
+
.el \{\
|
3267
|
+
.sp -1
|
3268
|
+
.IP \(bu 2.3
|
3269
|
+
.\}
|
3270
|
+
|
3271
|
+
[assert2]
|
3272
|
+
.RE
|
3273
|
+
.sp
|
3274
|
+
.RS 4
|
3275
|
+
.ie n \{\
|
3276
|
+
\h'-04'\(bu\h'+03'\c
|
3277
|
+
.\}
|
3278
|
+
.el \{\
|
3279
|
+
.sp -1
|
3280
|
+
.IP \(bu 2.3
|
3281
|
+
.\}
|
3282
|
+
|
3283
|
+
[Testy]
|
3284
|
+
.RE
|
3285
|
+
.sp
|
3286
|
+
.RS 4
|
3287
|
+
.ie n \{\
|
3288
|
+
\h'-04'\(bu\h'+03'\c
|
3289
|
+
.\}
|
3290
|
+
.el \{\
|
3291
|
+
.sp -1
|
3292
|
+
.IP \(bu 2.3
|
3293
|
+
.\}
|
3294
|
+
|
3295
|
+
[Verify]
|
3296
|
+
.RE
|
3297
|
+
.sp
|
3298
|
+
The status quo was certainly \fInot\fR "good enough", as I had so blindly believed all these years\&. In fact, they were \fIverbose\fR behemoths that chose to encode endless permutations of conjecture into methods\&.
|
3299
|
+
.sp
|
3300
|
+
Empowered by this revelation and inspired by Sean O\(cqHalpin\(cqs musing on alternative names for assertion methods, I rose to challenge the status quo\&.
|
3301
|
+
.sp
|
3302
|
+
And so I present to you the first public release of "Dfect"\&.
|
3303
|
+
.SH "AUTHORS"
|
3304
|
+
.sp
|
3305
|
+
Suraj N\&. Kurapati
|
3306
|
+
.SS "Credits"
|
3307
|
+
.sp
|
3308
|
+
François Beausoleil, Gavin Sinclair, Iñaki Baz Castillo, Sean O\(cqHalpin
|
3309
|
+
.SS "License"
|
3310
|
+
.sp
|
3311
|
+
(the ISC license)
|
3312
|
+
.sp
|
3313
|
+
Copyright 2009 Suraj N\&. Kurapati <sunaku@gmail\&.com>
|
3314
|
+
.sp
|
3315
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies\&.
|
3316
|
+
.sp
|
3317
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\&. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE\&.
|
3318
|
+
.SH "SEE ALSO"
|
3319
|
+
.sp
|
3320
|
+
[Attest], [assert2], [Testy], [Verify]
|
3321
|
+
.SS "References"
|
3322
|
+
.TS
|
3323
|
+
tab(:);
|
3324
|
+
lt lt
|
3325
|
+
lt lt
|
3326
|
+
lt lt
|
3327
|
+
lt lt
|
3328
|
+
lt lt
|
3329
|
+
lt lt
|
3330
|
+
lt lt
|
3331
|
+
lt lt
|
3332
|
+
lt lt
|
3333
|
+
lt lt
|
3334
|
+
lt lt
|
3335
|
+
lt lt
|
3336
|
+
lt lt.
|
3337
|
+
T{
|
3338
|
+
.sp
|
3339
|
+
assert2
|
3340
|
+
T}:T{
|
3341
|
+
.sp
|
3342
|
+
http://assert2\&.rubyforge\&.org
|
3343
|
+
T}
|
3344
|
+
T{
|
3345
|
+
.sp
|
3346
|
+
Attest
|
3347
|
+
T}:T{
|
3348
|
+
.sp
|
3349
|
+
http://gsinclair\&.github\&.com/attest\&.html
|
3350
|
+
T}
|
3351
|
+
T{
|
3352
|
+
.sp
|
3353
|
+
Inochi
|
3354
|
+
T}:T{
|
3355
|
+
.sp
|
3356
|
+
http://snk\&.tuxfamily\&.org/lib/inochi/
|
3357
|
+
T}
|
3358
|
+
T{
|
3359
|
+
.sp
|
3360
|
+
Minitest
|
3361
|
+
T}:T{
|
3362
|
+
.sp
|
3363
|
+
http://blog\&.zenspider\&.com/minitest/
|
3364
|
+
T}
|
3365
|
+
T{
|
3366
|
+
.sp
|
3367
|
+
OrderedHash
|
3368
|
+
T}:T{
|
3369
|
+
.sp
|
3370
|
+
http://rubygems\&.org/gems/orderedhash
|
3371
|
+
T}
|
3372
|
+
T{
|
3373
|
+
.sp
|
3374
|
+
RSpec
|
3375
|
+
T}:T{
|
3376
|
+
.sp
|
3377
|
+
http://rspec\&.info
|
3378
|
+
T}
|
3379
|
+
T{
|
3380
|
+
.sp
|
3381
|
+
ruby\-debug
|
3382
|
+
T}:T{
|
3383
|
+
.sp
|
3384
|
+
http://github\&.com/mark\-moseley/ruby\-debug
|
3385
|
+
T}
|
3386
|
+
T{
|
3387
|
+
.sp
|
3388
|
+
RubyGems
|
3389
|
+
T}:T{
|
3390
|
+
.sp
|
3391
|
+
http://rubygems\&.org
|
3392
|
+
T}
|
3393
|
+
T{
|
3394
|
+
.sp
|
3395
|
+
Ruby
|
3396
|
+
T}:T{
|
3397
|
+
.sp
|
3398
|
+
http://ruby\-lang\&.org
|
3399
|
+
T}
|
3400
|
+
T{
|
3401
|
+
.sp
|
3402
|
+
Test::Unit
|
3403
|
+
T}:T{
|
3404
|
+
.sp
|
3405
|
+
http://ruby\-doc\&.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit\&.html
|
3406
|
+
T}
|
3407
|
+
T{
|
3408
|
+
.sp
|
3409
|
+
Testy
|
3410
|
+
T}:T{
|
3411
|
+
.sp
|
3412
|
+
http://github\&.com/ahoward/testy/tree/master
|
3413
|
+
T}
|
3414
|
+
T{
|
3415
|
+
.sp
|
3416
|
+
Verify
|
3417
|
+
T}:T{
|
3418
|
+
.sp
|
3419
|
+
http://www\&.ruby\-forum\&.com/topic/183354
|
3420
|
+
T}
|
3421
|
+
T{
|
3422
|
+
.sp
|
3423
|
+
xUnit
|
3424
|
+
T}:T{
|
3425
|
+
.sp
|
3426
|
+
http://en\&.wikipedia\&.org/wiki/XUnit
|
3427
|
+
T}
|
3428
|
+
.TE
|
3429
|
+
.sp 1
|