difects 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/difects/inochi.rb +2 -2
- data/lib/difects.rb +33 -35
- data/man/man1/difects.1.gz +0 -0
- data/man.html +186 -108
- metadata +3 -3
data/lib/difects/inochi.rb
CHANGED
@@ -18,12 +18,12 @@ module DIFECTS
|
|
18
18
|
##
|
19
19
|
# Number of this release of this project.
|
20
20
|
#
|
21
|
-
VERSION = '3.0.
|
21
|
+
VERSION = '3.0.1'
|
22
22
|
|
23
23
|
##
|
24
24
|
# Date of this release of this project.
|
25
25
|
#
|
26
|
-
RELDATE = '2010-07-
|
26
|
+
RELDATE = '2010-07-25'
|
27
27
|
|
28
28
|
##
|
29
29
|
# Description of this release of this project.
|
data/lib/difects.rb
CHANGED
@@ -584,7 +584,7 @@ module DIFECTS
|
|
584
584
|
else
|
585
585
|
# find the closest insulated parent test; this should always
|
586
586
|
# succeed because root-level tests are insulated by default
|
587
|
-
test = @tests.reverse.find {|t| t.sandbox }
|
587
|
+
test = @tests.reverse.find {|t| t.sandbox } or raise IndexError
|
588
588
|
test.sandbox.instance_eval(&block)
|
589
589
|
end
|
590
590
|
|
@@ -995,7 +995,7 @@ module DIFECTS
|
|
995
995
|
format % [('=>' if n == source_line), n, source[n-1].chomp]
|
996
996
|
end.unshift "[#{region.inspect}] in #{source_file}"
|
997
997
|
|
998
|
-
pretty.extend
|
998
|
+
pretty.extend FailureDetails::CodeListing
|
999
999
|
end
|
1000
1000
|
)
|
1001
1001
|
]
|
@@ -1005,17 +1005,15 @@ module DIFECTS
|
|
1005
1005
|
details[:bind] = [source_file, binding_line].join(':')
|
1006
1006
|
|
1007
1007
|
# variable values
|
1008
|
-
|
1008
|
+
variables = eval('::Kernel.local_variables', binding, __FILE__, __LINE__)
|
1009
1009
|
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
end
|
1014
|
-
|
1015
|
-
details[:vars] = Hash[*pairs].extend(FailureDetailsVariablesListing)
|
1010
|
+
details[:vars] = variables.inject(Hash.new) do |hash, variable|
|
1011
|
+
hash[variable.to_sym] = eval(variable.to_s, binding, __FILE__, __LINE__)
|
1012
|
+
hash
|
1013
|
+
end.extend(FailureDetails::VariablesListing)
|
1016
1014
|
end
|
1017
1015
|
|
1018
|
-
details.reject! {|
|
1016
|
+
details.reject! {|key, value| (value || details[key]).nil? }
|
1019
1017
|
@trace << details
|
1020
1018
|
|
1021
1019
|
# show all failure details to the user
|
@@ -1067,37 +1065,37 @@ module DIFECTS
|
|
1067
1065
|
end
|
1068
1066
|
|
1069
1067
|
##
|
1070
|
-
# Logic to pretty print the
|
1068
|
+
# Logic to pretty print the details of an assertion failure.
|
1071
1069
|
#
|
1072
|
-
module
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1070
|
+
module FailureDetails # @private
|
1071
|
+
module CodeListing
|
1072
|
+
def to_yaml options = {}
|
1073
|
+
#
|
1074
|
+
# strip because to_yaml() will render the paragraph without escaping
|
1075
|
+
# newlines ONLY IF the first and last character are non-whitespace!
|
1076
|
+
#
|
1077
|
+
join("\n").strip.to_yaml(options)
|
1078
|
+
end
|
1080
1079
|
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1080
|
+
def pretty_print printer
|
1081
|
+
margin = ' ' * printer.indent
|
1082
|
+
printer.text [
|
1083
|
+
first, self[1..-1].map {|line| margin + line }, margin
|
1084
|
+
].join(printer.newline)
|
1085
|
+
end
|
1086
1086
|
end
|
1087
|
-
end
|
1088
1087
|
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1088
|
+
module VariablesListing
|
1089
|
+
def to_yaml options = {}
|
1090
|
+
require 'pp'
|
1091
|
+
require 'stringio'
|
1093
1092
|
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1093
|
+
inject(Hash.new) do |hash, (variable, value)|
|
1094
|
+
pretty = PP.pp(value, StringIO.new).string.chomp
|
1095
|
+
hash[variable] = "(#{value.class}) #{pretty}"
|
1096
|
+
hash
|
1097
|
+
end.to_yaml(options)
|
1098
1098
|
end
|
1099
|
-
|
1100
|
-
Hash[*pairs].to_yaml(options)
|
1101
1099
|
end
|
1102
1100
|
end
|
1103
1101
|
|
data/man/man1/difects.1.gz
CHANGED
Binary file
|
data/man.html
CHANGED
@@ -83,7 +83,7 @@
|
|
83
83
|
|
84
84
|
<ol class='man-decor man-head man head'>
|
85
85
|
<li class='tl'>difects(1)</li>
|
86
|
-
<li class='tc'>Version 3.0.
|
86
|
+
<li class='tc'>Version 3.0.1</li>
|
87
87
|
<li class='tr'>difects(1)</li>
|
88
88
|
</ol>
|
89
89
|
|
@@ -154,7 +154,7 @@ composing tests.</p>
|
|
154
154
|
<p>Evaluates the given <var>FILE</var>s and also files matching the given <var>GLOB</var> patterns.</p>
|
155
155
|
|
156
156
|
<p>The exit status of this command reflects the number of errors and assertion
|
157
|
-
failures up to a maximum of 255
|
157
|
+
failures (up to a maximum of 255 to avoid 8-bit unsigned integer overflow).</p>
|
158
158
|
|
159
159
|
<h2 id="OPTIONS">OPTIONS</h2>
|
160
160
|
|
@@ -183,22 +183,19 @@ end
|
|
183
183
|
<h3 id="Hooks">Hooks</h3>
|
184
184
|
|
185
185
|
<p>A <strong>hook</strong> is a scheduled point of entry into the test execution process. The
|
186
|
-
<
|
186
|
+
following <strong>hook methods</strong> allow you to register a block of code to execute
|
187
|
+
when a hook occurs:</p>
|
187
188
|
|
188
|
-
<
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
189
|
+
<dl>
|
190
|
+
<dt class="flush"><code>D.<()</code></dt><dd><p>Calls the given block <em>before each</em> child test.</p></dd>
|
191
|
+
<dt class="flush"><code>D.>()</code></dt><dd><p>Calls the given block <em>after each</em> child test.</p></dd>
|
192
|
+
<dt class="flush"><code>D.<<()</code></dt><dd><p>Calls the given block <em>before all</em> child tests.</p></dd>
|
193
|
+
<dt class="flush"><code>D.>>()</code></dt><dd><p>Calls the given block <em>after all</em> child tests.</p></dd>
|
194
|
+
</dl>
|
193
195
|
|
194
|
-
D "inner test" do
|
195
|
-
# assertions and logic here
|
196
|
-
end
|
197
|
-
end
|
198
|
-
</code></pre>
|
199
196
|
|
200
|
-
<p>A hook method can be called multiple times.
|
201
|
-
|
197
|
+
<p>A hook method can be called multiple times. Each additional call schedules
|
198
|
+
more logic to be executed during the hook:</p>
|
202
199
|
|
203
200
|
<pre><code>D .< { puts "do something" }
|
204
201
|
D .< { puts "do something more!" }
|
@@ -206,13 +203,13 @@ D .< { puts "do something more!" }
|
|
206
203
|
|
207
204
|
<h3 id="Insulation">Insulation</h3>
|
208
205
|
|
209
|
-
<p>The <code>D!()</code> method defines a new test that is explicitly insulated from
|
210
|
-
|
206
|
+
<p>The <code>D!()</code> method defines a new test that is explicitly insulated from the
|
207
|
+
tests that contain it and also from the top-level Ruby environment.
|
211
208
|
Root-level calls to the <code>D()</code> method are insulated by default.</p>
|
212
209
|
|
213
210
|
<p>Inside an insulated test, you are free to mix-in (using the <code>extend</code> keyword,
|
214
|
-
not the <code>include</code> keyword) any modules your test logic needs
|
215
|
-
your own constants, methods, and classes.</p>
|
211
|
+
not the <code>include</code> keyword) any modules your test logic needs. You can also
|
212
|
+
define your own constants, methods, and classes.</p>
|
216
213
|
|
217
214
|
<h3 id="Sharing">Sharing</h3>
|
218
215
|
|
@@ -232,7 +229,7 @@ method is called.</p></dd>
|
|
232
229
|
|
233
230
|
<dl>
|
234
231
|
<dt class="flush"><code>I()</code></dt><dd><p>Mechanism for inserting arbitrary Ruby objects into the test execution
|
235
|
-
report. You can think of this method as a way to <em>inform</em>
|
232
|
+
report. You can think of this method as being a way to <em>inform</em> someone.</p></dd>
|
236
233
|
<dt class="flush"><code>I!()</code></dt><dd><p>Starts the interactive debugger at the location where it is called.</p></dd>
|
237
234
|
</dl>
|
238
235
|
|
@@ -244,7 +241,6 @@ report. You can think of this method as a way to <em>inform</em> yourself.</p><
|
|
244
241
|
<p>You can configure the test execution process using:</p>
|
245
242
|
|
246
243
|
<pre><code>DIFECTS.debug = your_choice_here
|
247
|
-
DIFECTS.quiet = your_choice_here
|
248
244
|
</code></pre>
|
249
245
|
|
250
246
|
<p>You can execute all tests defined thus far using:</p>
|
@@ -361,11 +357,11 @@ recording a success or failure in the test execution report.</p>
|
|
361
357
|
<p>Failure reports are composed of the following sections:</p>
|
362
358
|
|
363
359
|
<dl>
|
364
|
-
<dt class="flush"
|
365
|
-
<dt class="flush"
|
366
|
-
<dt class="flush"
|
367
|
-
<dt class="flush"
|
368
|
-
<dt class="flush"
|
360
|
+
<dt class="flush"><code>:fail</code></dt><dd><p>Description of the assertion failure.</p></dd>
|
361
|
+
<dt class="flush"><code>:call</code></dt><dd><p>Stack trace leading to the point of failure.</p></dd>
|
362
|
+
<dt class="flush"><code>:code</code></dt><dd><p>Source code surrounding the point of failure.</p></dd>
|
363
|
+
<dt class="flush"><code>:bind</code></dt><dd><p>Location where local variables (in the "vars" section) were extracted.</p></dd>
|
364
|
+
<dt class="flush"><code>:vars</code></dt><dd><p>Local variables visible at the point of failure.</p></dd>
|
369
365
|
</dl>
|
370
366
|
|
371
367
|
|
@@ -396,11 +392,11 @@ write your tests using the familiar syntax of the testing library it emulates.</
|
|
396
392
|
<code>DIFECTS</code> module.</p>
|
397
393
|
|
398
394
|
<dl>
|
399
|
-
<dt><code>after</code>(<em>what</em>, &<em>block</em>)</dt><dd><p>
|
400
|
-
<dt><code>before</code>(<em>what</em>, &<em>block</em>)</dt><dd><p>
|
401
|
-
<dt><code>context</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
402
|
-
<dt><code>describe</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
403
|
-
<dt><code>it</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
395
|
+
<dt><code>after</code>(<em>what</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/spec.rb#L21">lib/difects/spec.rb:21</a>.</p></dd>
|
396
|
+
<dt><code>before</code>(<em>what</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/spec.rb#L10">lib/difects/spec.rb:10</a>.</p></dd>
|
397
|
+
<dt><code>context</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
398
|
+
<dt><code>describe</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
399
|
+
<dt><code>it</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
404
400
|
</dl>
|
405
401
|
|
406
402
|
|
@@ -410,43 +406,43 @@ write your tests using the familiar syntax of the testing library it emulates.</
|
|
410
406
|
<code>DIFECTS</code> module.</p>
|
411
407
|
|
412
408
|
<dl>
|
413
|
-
<dt><code>assert</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
414
|
-
<dt><code>assert_empty</code>(<em>collection</em>, <em>message</em>=nil)</dt><dd><p>
|
415
|
-
<dt><code>assert_equal</code>(<em>expected</em>, <em>actual</em>, <em>message</em>=nil)</dt><dd><p>
|
416
|
-
<dt><code>assert_in_delta</code>(<em>expected</em>, <em>actual</em>, <em>delta</em>=nil, <em>message</em>=nil)</dt><dd><p>
|
417
|
-
<dt><code>assert_in_epsilon</code>(<em>expected</em>, <em>actual</em>, <em>delta</em>=nil, <em>message</em>=nil)</dt><dd><p>
|
418
|
-
<dt><code>assert_include</code>(<em>item</em>, <em>collection</em>, <em>message</em>=nil)</dt><dd><p>
|
419
|
-
<dt><code>assert_instance_of</code>(<em>klass</em>, <em>object</em>, <em>message</em>=nil)</dt><dd><p>
|
420
|
-
<dt><code>assert_kind_of</code>(<em>klass</em>, <em>object</em>, <em>message</em>=nil)</dt><dd><p>
|
421
|
-
<dt><code>assert_match</code>(<em>pattern</em>, <em>string</em>, <em>message</em>=nil)</dt><dd><p>
|
422
|
-
<dt><code>assert_nil</code>(<em>object</em>, <em>message</em>=nil)</dt><dd><p>
|
423
|
-
<dt><code>assert_not</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
424
|
-
<dt><code>assert_not_empty</code>(<em>collection</em>, <em>message</em>=nil)</dt><dd><p>
|
425
|
-
<dt><code>assert_not_equal</code>(<em>expected</em>, <em>actual</em>, <em>message</em>=nil)</dt><dd><p>
|
426
|
-
<dt><code>assert_not_in_delta</code>(<em>expected</em>, <em>actual</em>, <em>delta</em>=nil, <em>message</em>=nil)</dt><dd><p>
|
427
|
-
<dt><code>assert_not_in_epsilon</code>(<em>expected</em>, <em>actual</em>, <em>delta</em>=nil, <em>message</em>=nil)</dt><dd><p>
|
428
|
-
<dt><code>assert_not_include</code>(<em>item</em>, <em>collection</em>, <em>message</em>=nil)</dt><dd><p>
|
429
|
-
<dt><code>assert_not_instance_of</code>(<em>klass</em>, <em>object</em>, <em>message</em>=nil)</dt><dd><p>
|
430
|
-
<dt><code>assert_not_kind_of</code>(<em>klass</em>, <em>object</em>, <em>message</em>=nil)</dt><dd><p>
|
431
|
-
<dt><code>assert_not_match</code>(<em>pattern</em>, <em>string</em>, <em>message</em>=nil)</dt><dd><p>
|
432
|
-
<dt><code>assert_not_nil</code>(<em>object</em>, <em>message</em>=nil)</dt><dd><p>
|
433
|
-
<dt><code>assert_not_operator</code>(<em>object</em>, <em>operator</em>, <em>operand</em>, <em>message</em>=nil)</dt><dd><p>
|
434
|
-
<dt><code>assert_not_raise</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
435
|
-
<dt><code>assert_not_respond_to</code>(<em>object</em>, <em>query</em>, <em>message</em>=nil)</dt><dd><p>
|
436
|
-
<dt><code>assert_not_same</code>(<em>expected</em>, <em>actual</em>, <em>message</em>=nil)</dt><dd><p>
|
437
|
-
<dt><code>assert_not_send</code>(<em>object</em>, <em>query</em>, *<em>args</em>)</dt><dd><p>
|
438
|
-
<dt><code>assert_not_throw</code>(<em>symbol</em>, <em>message</em>=nil, &<em>block</em>)</dt><dd><p>
|
439
|
-
<dt><code>assert_operator</code>(<em>object</em>, <em>operator</em>, <em>operand</em>, <em>message</em>=nil)</dt><dd><p>
|
440
|
-
<dt><code>assert_raise</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
441
|
-
<dt><code>assert_respond_to</code>(<em>object</em>, <em>query</em>, <em>message</em>=nil)</dt><dd><p>
|
442
|
-
<dt><code>assert_same</code>(<em>expected</em>, <em>actual</em>, <em>message</em>=nil)</dt><dd><p>
|
443
|
-
<dt><code>assert_send</code>(<em>object</em>, <em>query</em>, *<em>args</em>)</dt><dd><p>
|
444
|
-
<dt><code>assert_throw</code>(<em>symbol</em>, <em>message</em>=nil, &<em>block</em>)</dt><dd><p>
|
445
|
-
<dt><code>setup</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
446
|
-
<dt><code>setup!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
447
|
-
<dt><code>teardown</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
448
|
-
<dt><code>teardown!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
449
|
-
<dt><code>test</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
409
|
+
<dt><code>assert</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
410
|
+
<dt><code>assert_empty</code>(<em>collection</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L26">lib/difects/unit.rb:26</a>.</p></dd>
|
411
|
+
<dt><code>assert_equal</code>(<em>expected</em>, <em>actual</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L31">lib/difects/unit.rb:31</a>.</p></dd>
|
412
|
+
<dt><code>assert_in_delta</code>(<em>expected</em>, <em>actual</em>, <em>delta</em>=nil, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L36">lib/difects/unit.rb:36</a>.</p></dd>
|
413
|
+
<dt><code>assert_in_epsilon</code>(<em>expected</em>, <em>actual</em>, <em>delta</em>=nil, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L36">lib/difects/unit.rb:36</a>.</p></dd>
|
414
|
+
<dt><code>assert_include</code>(<em>item</em>, <em>collection</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L47">lib/difects/unit.rb:47</a>.</p></dd>
|
415
|
+
<dt><code>assert_instance_of</code>(<em>klass</em>, <em>object</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L52">lib/difects/unit.rb:52</a>.</p></dd>
|
416
|
+
<dt><code>assert_kind_of</code>(<em>klass</em>, <em>object</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L57">lib/difects/unit.rb:57</a>.</p></dd>
|
417
|
+
<dt><code>assert_match</code>(<em>pattern</em>, <em>string</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L67">lib/difects/unit.rb:67</a>.</p></dd>
|
418
|
+
<dt><code>assert_nil</code>(<em>object</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L62">lib/difects/unit.rb:62</a>.</p></dd>
|
419
|
+
<dt><code>assert_not</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
420
|
+
<dt><code>assert_not_empty</code>(<em>collection</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L26">lib/difects/unit.rb:26</a>.</p></dd>
|
421
|
+
<dt><code>assert_not_equal</code>(<em>expected</em>, <em>actual</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L31">lib/difects/unit.rb:31</a>.</p></dd>
|
422
|
+
<dt><code>assert_not_in_delta</code>(<em>expected</em>, <em>actual</em>, <em>delta</em>=nil, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L36">lib/difects/unit.rb:36</a>.</p></dd>
|
423
|
+
<dt><code>assert_not_in_epsilon</code>(<em>expected</em>, <em>actual</em>, <em>delta</em>=nil, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L36">lib/difects/unit.rb:36</a>.</p></dd>
|
424
|
+
<dt><code>assert_not_include</code>(<em>item</em>, <em>collection</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L47">lib/difects/unit.rb:47</a>.</p></dd>
|
425
|
+
<dt><code>assert_not_instance_of</code>(<em>klass</em>, <em>object</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L52">lib/difects/unit.rb:52</a>.</p></dd>
|
426
|
+
<dt><code>assert_not_kind_of</code>(<em>klass</em>, <em>object</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L57">lib/difects/unit.rb:57</a>.</p></dd>
|
427
|
+
<dt><code>assert_not_match</code>(<em>pattern</em>, <em>string</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L67">lib/difects/unit.rb:67</a>.</p></dd>
|
428
|
+
<dt><code>assert_not_nil</code>(<em>object</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L62">lib/difects/unit.rb:62</a>.</p></dd>
|
429
|
+
<dt><code>assert_not_operator</code>(<em>object</em>, <em>operator</em>, <em>operand</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L77">lib/difects/unit.rb:77</a>.</p></dd>
|
430
|
+
<dt><code>assert_not_raise</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L82">lib/difects/unit.rb:82</a>.</p></dd>
|
431
|
+
<dt><code>assert_not_respond_to</code>(<em>object</em>, <em>query</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L86">lib/difects/unit.rb:86</a>.</p></dd>
|
432
|
+
<dt><code>assert_not_same</code>(<em>expected</em>, <em>actual</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L72">lib/difects/unit.rb:72</a>.</p></dd>
|
433
|
+
<dt><code>assert_not_send</code>(<em>object</em>, <em>query</em>, *<em>args</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L95">lib/difects/unit.rb:95</a>.</p></dd>
|
434
|
+
<dt><code>assert_not_throw</code>(<em>symbol</em>, <em>message</em>=nil, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L91">lib/difects/unit.rb:91</a>.</p></dd>
|
435
|
+
<dt><code>assert_operator</code>(<em>object</em>, <em>operator</em>, <em>operand</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L77">lib/difects/unit.rb:77</a>.</p></dd>
|
436
|
+
<dt><code>assert_raise</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L82">lib/difects/unit.rb:82</a>.</p></dd>
|
437
|
+
<dt><code>assert_respond_to</code>(<em>object</em>, <em>query</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L86">lib/difects/unit.rb:86</a>.</p></dd>
|
438
|
+
<dt><code>assert_same</code>(<em>expected</em>, <em>actual</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L72">lib/difects/unit.rb:72</a>.</p></dd>
|
439
|
+
<dt><code>assert_send</code>(<em>object</em>, <em>query</em>, *<em>args</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L95">lib/difects/unit.rb:95</a>.</p></dd>
|
440
|
+
<dt><code>assert_throw</code>(<em>symbol</em>, <em>message</em>=nil, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L91">lib/difects/unit.rb:91</a>.</p></dd>
|
441
|
+
<dt><code>setup</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
442
|
+
<dt><code>setup!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
443
|
+
<dt><code>teardown</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
444
|
+
<dt><code>teardown!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
445
|
+
<dt><code>test</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
450
446
|
</dl>
|
451
447
|
|
452
448
|
|
@@ -456,22 +452,22 @@ write your tests using the familiar syntax of the testing library it emulates.</
|
|
456
452
|
<code>DIFECTS</code> module.</p>
|
457
453
|
|
458
454
|
<dl>
|
459
|
-
<dt><code>refute</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
460
|
-
<dt><code>refute_empty</code>(<em>collection</em>, <em>message</em>=nil)</dt><dd><p>
|
461
|
-
<dt><code>refute_equal</code>(<em>expected</em>, <em>actual</em>, <em>message</em>=nil)</dt><dd><p>
|
462
|
-
<dt><code>refute_in_delta</code>(<em>expected</em>, <em>actual</em>, <em>delta</em>=nil, <em>message</em>=nil)</dt><dd><p>
|
463
|
-
<dt><code>refute_in_epsilon</code>(<em>expected</em>, <em>actual</em>, <em>delta</em>=nil, <em>message</em>=nil)</dt><dd><p>
|
464
|
-
<dt><code>refute_include</code>(<em>item</em>, <em>collection</em>, <em>message</em>=nil)</dt><dd><p>
|
465
|
-
<dt><code>refute_instance_of</code>(<em>klass</em>, <em>object</em>, <em>message</em>=nil)</dt><dd><p>
|
466
|
-
<dt><code>refute_kind_of</code>(<em>klass</em>, <em>object</em>, <em>message</em>=nil)</dt><dd><p>
|
467
|
-
<dt><code>refute_match</code>(<em>pattern</em>, <em>string</em>, <em>message</em>=nil)</dt><dd><p>
|
468
|
-
<dt><code>refute_nil</code>(<em>object</em>, <em>message</em>=nil)</dt><dd><p>
|
469
|
-
<dt><code>refute_operator</code>(<em>object</em>, <em>operator</em>, <em>operand</em>, <em>message</em>=nil)</dt><dd><p>
|
470
|
-
<dt><code>refute_raise</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
471
|
-
<dt><code>refute_respond_to</code>(<em>object</em>, <em>query</em>, <em>message</em>=nil)</dt><dd><p>
|
472
|
-
<dt><code>refute_same</code>(<em>expected</em>, <em>actual</em>, <em>message</em>=nil)</dt><dd><p>
|
473
|
-
<dt><code>refute_send</code>(<em>object</em>, <em>query</em>, *<em>args</em>)</dt><dd><p>
|
474
|
-
<dt><code>refute_throw</code>(<em>symbol</em>, <em>message</em>=nil, &<em>block</em>)</dt><dd><p>
|
455
|
+
<dt><code>refute</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
456
|
+
<dt><code>refute_empty</code>(<em>collection</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L26">lib/difects/unit.rb:26</a>.</p></dd>
|
457
|
+
<dt><code>refute_equal</code>(<em>expected</em>, <em>actual</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L31">lib/difects/unit.rb:31</a>.</p></dd>
|
458
|
+
<dt><code>refute_in_delta</code>(<em>expected</em>, <em>actual</em>, <em>delta</em>=nil, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L36">lib/difects/unit.rb:36</a>.</p></dd>
|
459
|
+
<dt><code>refute_in_epsilon</code>(<em>expected</em>, <em>actual</em>, <em>delta</em>=nil, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L36">lib/difects/unit.rb:36</a>.</p></dd>
|
460
|
+
<dt><code>refute_include</code>(<em>item</em>, <em>collection</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L47">lib/difects/unit.rb:47</a>.</p></dd>
|
461
|
+
<dt><code>refute_instance_of</code>(<em>klass</em>, <em>object</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L52">lib/difects/unit.rb:52</a>.</p></dd>
|
462
|
+
<dt><code>refute_kind_of</code>(<em>klass</em>, <em>object</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L57">lib/difects/unit.rb:57</a>.</p></dd>
|
463
|
+
<dt><code>refute_match</code>(<em>pattern</em>, <em>string</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L67">lib/difects/unit.rb:67</a>.</p></dd>
|
464
|
+
<dt><code>refute_nil</code>(<em>object</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L62">lib/difects/unit.rb:62</a>.</p></dd>
|
465
|
+
<dt><code>refute_operator</code>(<em>object</em>, <em>operator</em>, <em>operand</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L77">lib/difects/unit.rb:77</a>.</p></dd>
|
466
|
+
<dt><code>refute_raise</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L82">lib/difects/unit.rb:82</a>.</p></dd>
|
467
|
+
<dt><code>refute_respond_to</code>(<em>object</em>, <em>query</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L86">lib/difects/unit.rb:86</a>.</p></dd>
|
468
|
+
<dt><code>refute_same</code>(<em>expected</em>, <em>actual</em>, <em>message</em>=nil)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L72">lib/difects/unit.rb:72</a>.</p></dd>
|
469
|
+
<dt><code>refute_send</code>(<em>object</em>, <em>query</em>, *<em>args</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L95">lib/difects/unit.rb:95</a>.</p></dd>
|
470
|
+
<dt><code>refute_throw</code>(<em>symbol</em>, <em>message</em>=nil, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects/unit.rb#L91">lib/difects/unit.rb:91</a>.</p></dd>
|
475
471
|
</dl>
|
476
472
|
|
477
473
|
|
@@ -481,25 +477,25 @@ write your tests using the familiar syntax of the testing library it emulates.</
|
|
481
477
|
<code>DIFECTS</code> module.</p>
|
482
478
|
|
483
479
|
<dl>
|
484
|
-
<dt><code>Catch</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
485
|
-
<dt><code>Catch!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
486
|
-
<dt><code>Catch?</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
487
|
-
<dt><code>Describe</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
488
|
-
<dt><code>Describe!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
489
|
-
<dt><code>Error</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
490
|
-
<dt><code>Error!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
491
|
-
<dt><code>Error?</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
492
|
-
<dt><code>False</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
493
|
-
<dt><code>False!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
494
|
-
<dt><code>False?</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
495
|
-
<dt><code>Inform</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
496
|
-
<dt><code>Inform!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
497
|
-
<dt><code>Share</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
498
|
-
<dt><code>Share!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
499
|
-
<dt><code>Share?</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
500
|
-
<dt><code>True</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
501
|
-
<dt><code>True!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
502
|
-
<dt><code>True?</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>
|
480
|
+
<dt><code>Catch</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
481
|
+
<dt><code>Catch!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
482
|
+
<dt><code>Catch?</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
483
|
+
<dt><code>Describe</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
484
|
+
<dt><code>Describe!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
485
|
+
<dt><code>Error</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
486
|
+
<dt><code>Error!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
487
|
+
<dt><code>Error?</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
488
|
+
<dt><code>False</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
489
|
+
<dt><code>False!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
490
|
+
<dt><code>False?</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
491
|
+
<dt><code>Inform</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
492
|
+
<dt><code>Inform!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
493
|
+
<dt><code>Share</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
494
|
+
<dt><code>Share!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
495
|
+
<dt><code>Share?</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
496
|
+
<dt><code>True</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
497
|
+
<dt><code>True!</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
498
|
+
<dt><code>True?</code>(*<em>args</em>, &<em>block</em>)</dt><dd><p>This method is defined at <a href="http://github.com/sunaku/difects/tree/master/lib/difects.rb#L1124">lib/difects.rb:1124</a>.</p></dd>
|
503
499
|
</dl>
|
504
500
|
|
505
501
|
|
@@ -556,7 +552,7 @@ end
|
|
556
552
|
- Preparing spell to defeat mortal foes...
|
557
553
|
- Magician:
|
558
554
|
- Preparing rabbits to pull from hat...
|
559
|
-
-
|
555
|
+
- 13
|
560
556
|
- Calculator:
|
561
557
|
- 3.141592653589793
|
562
558
|
- - 1
|
@@ -567,7 +563,66 @@ end
|
|
567
563
|
- c
|
568
564
|
- foo: bar!
|
569
565
|
---
|
570
|
-
time: 0.
|
566
|
+
time: 0.00290479
|
567
|
+
</code></pre>
|
568
|
+
|
569
|
+
<h3 id="Using-hooks-to-perform-before-and-after-actions">Using hooks to perform before and after actions</h3>
|
570
|
+
|
571
|
+
<p>When the following test is run:</p>
|
572
|
+
|
573
|
+
<pre><code>require 'difects/auto'
|
574
|
+
|
575
|
+
D "outer test" do
|
576
|
+
D .< { I "(outer hook) before each" }
|
577
|
+
D .> { I "(outer hook) after each" }
|
578
|
+
D .<< { I "(outer hook) before all" }
|
579
|
+
D .>> { I "(outer hook) after all" }
|
580
|
+
|
581
|
+
D "inner test 1" do
|
582
|
+
D .< { I "(inner hook) before each" }
|
583
|
+
D .> { I "(inner hook) after each" }
|
584
|
+
D .<< { I "(inner hook) before all" }
|
585
|
+
D .>> { I "(inner hook) after all" }
|
586
|
+
|
587
|
+
D "inner test 1.1" do
|
588
|
+
I "hello world"
|
589
|
+
end
|
590
|
+
end
|
591
|
+
|
592
|
+
D "inner test 2" do
|
593
|
+
I "goodbye world"
|
594
|
+
end
|
595
|
+
|
596
|
+
D .< { I "(outer hook) before each, again" }
|
597
|
+
D .> { I "(outer hook) after each, again" }
|
598
|
+
end
|
599
|
+
</code></pre>
|
600
|
+
|
601
|
+
<p>DIFECTS will output the following:</p>
|
602
|
+
|
603
|
+
<pre><code>---
|
604
|
+
- outer test:
|
605
|
+
- (outer hook) before all
|
606
|
+
- (outer hook) before each
|
607
|
+
- (outer hook) before each, again
|
608
|
+
- inner test 1:
|
609
|
+
- (inner hook) before all
|
610
|
+
- (inner hook) before each
|
611
|
+
- inner test 1.1:
|
612
|
+
- hello world
|
613
|
+
- (inner hook) after each
|
614
|
+
- (inner hook) after all
|
615
|
+
- (outer hook) after each
|
616
|
+
- (outer hook) after each, again
|
617
|
+
- (outer hook) before each
|
618
|
+
- (outer hook) before each, again
|
619
|
+
- inner test 2:
|
620
|
+
- goodbye world
|
621
|
+
- (outer hook) after each
|
622
|
+
- (outer hook) after each, again
|
623
|
+
- (outer hook) after all
|
624
|
+
---
|
625
|
+
time: 0.007519821
|
571
626
|
</code></pre>
|
572
627
|
|
573
628
|
<h3 id="Sharing-code-between-tests">Sharing code between tests</h3>
|
@@ -617,7 +672,7 @@ end
|
|
617
672
|
- Power is power!
|
618
673
|
---
|
619
674
|
pass: 3
|
620
|
-
time: 0.
|
675
|
+
time: 0.007250196
|
621
676
|
</code></pre>
|
622
677
|
|
623
678
|
<h3 id="Insulated-and-uninsulated-tests">Insulated and uninsulated tests</h3>
|
@@ -658,7 +713,7 @@ end
|
|
658
713
|
- an inner, insulated test:
|
659
714
|
---
|
660
715
|
pass: 10
|
661
|
-
time: 0.
|
716
|
+
time: 0.00794053
|
662
717
|
</code></pre>
|
663
718
|
|
664
719
|
<h2 id="HACKING">HACKING</h2>
|
@@ -746,6 +801,29 @@ in the <code>test/test_helper.rb</code> file.</p>
|
|
746
801
|
|
747
802
|
<p>This section contains release notes of current and past releases.</p>
|
748
803
|
|
804
|
+
<h3 id="Version-3-0-1-2010-07-25-">Version 3.0.1 (2010-07-25)</h3>
|
805
|
+
|
806
|
+
<p>This release fixes a bug in Ruby 1.8, refactors the code, and better documents
|
807
|
+
test hooks in the manual.</p>
|
808
|
+
|
809
|
+
<p>Bug fixes:</p>
|
810
|
+
|
811
|
+
<ul>
|
812
|
+
<li>Ruby 1.8 does not pass value to <code>Hash#delete_if()</code>. All failure details
|
813
|
+
were being omitted, instead of just the unavailable ones, as a result.</li>
|
814
|
+
</ul>
|
815
|
+
|
816
|
+
|
817
|
+
<p>Housekeeping:</p>
|
818
|
+
|
819
|
+
<ul>
|
820
|
+
<li><p>Refactor variable values hash calculation and pretty printing logic.</p></li>
|
821
|
+
<li><p>Put FailureDetails pretty-printing modules into their own namespace.</p></li>
|
822
|
+
<li><p>Raise error if closest insulated test cannot be not found.</p></li>
|
823
|
+
<li><p>Describe all test hooks and add example to manual, plus small revisions.</p></li>
|
824
|
+
</ul>
|
825
|
+
|
826
|
+
|
749
827
|
<h3 id="Version-3-0-0-2010-07-24-">Version 3.0.0 (2010-07-24)</h3>
|
750
828
|
|
751
829
|
<p>This release renames the project to "DIFECTS", reduces cruft, improves the
|
@@ -1159,7 +1237,7 @@ Sean O'Halpin</p>
|
|
1159
1237
|
|
1160
1238
|
<p>(the ISC license)</p>
|
1161
1239
|
|
1162
|
-
<p>Copyright 2009 Suraj N. Kurapati <a href="&#
|
1240
|
+
<p>Copyright 2009 Suraj N. Kurapati <a href="mailto:sunaku@gmail.com" data-bare-link="true">sunaku@gmail.com</a></p>
|
1163
1241
|
|
1164
1242
|
<p>Permission to use, copy, modify, and/or distribute this software for any
|
1165
1243
|
purpose with or without fee is hereby granted, provided that the above
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 3
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 3.0.
|
8
|
+
- 1
|
9
|
+
version: 3.0.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Suraj N. Kurapati
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-07-
|
17
|
+
date: 2010-07-25 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|