dfect 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CREDITS +1 -0
- data/doc/api/{files/ANN_txt.html → classes/Class.html} +21 -28
- data/doc/api/classes/Dfect.html +446 -139
- data/doc/api/created.rid +1 -1
- data/doc/api/files/CREDITS.html +62 -0
- data/doc/api/files/LICENSE.html +4 -2
- data/doc/api/files/lib/dfect/auto_rb.html +4 -2
- data/doc/api/files/lib/dfect_rb.html +3 -1
- data/doc/api/js/searchdoc.js +1 -2
- data/doc/api/panel/search_index.js +1 -1
- data/doc/history.erb +31 -2
- data/doc/index.xhtml +773 -0
- data/doc/intro.erb +28 -15
- data/doc/setup.erb +4 -4
- data/doc/usage.erb +105 -46
- data/lib/dfect.rb +385 -87
- data/rakefile +4 -2
- data/test/dfect.rb +168 -15
- metadata +21 -19
data/doc/api/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Tue, 28 Apr 2009 22:22:35 -0700
|
@@ -0,0 +1,62 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<title>CREDITS</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
+
<link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" />
|
9
|
+
<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" />
|
10
|
+
<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
11
|
+
<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
|
12
|
+
<script src="../js/main.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
</head>
|
14
|
+
|
15
|
+
<body>
|
16
|
+
<div class="banner">
|
17
|
+
<h1>
|
18
|
+
CREDITS
|
19
|
+
</h1>
|
20
|
+
<ul class="files">
|
21
|
+
<li>CREDITS</li>
|
22
|
+
<li>Last modified: Tue Apr 28 22:21:44 -0700 2009</li>
|
23
|
+
</ul>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div id="bodyContent">
|
27
|
+
<div id="content">
|
28
|
+
|
29
|
+
<div class="description">
|
30
|
+
<ul>
|
31
|
+
<li>[François Beausoleil](<a
|
32
|
+
href="http://github.com/francois">github.com/francois</a>)
|
33
|
+
|
34
|
+
</li>
|
35
|
+
</ul>
|
36
|
+
|
37
|
+
</div>
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
</body>
|
62
|
+
</html>
|
data/doc/api/files/LICENSE.html
CHANGED
@@ -26,7 +26,8 @@
|
|
26
26
|
<div id="bodyContent">
|
27
27
|
<div id="content">
|
28
28
|
|
29
|
-
<div class="description"
|
29
|
+
<div class="description">
|
30
|
+
<p>
|
30
31
|
(the ISC license)
|
31
32
|
</p>
|
32
33
|
<p>
|
@@ -46,7 +47,8 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
46
47
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
47
48
|
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
48
49
|
</p>
|
49
|
-
|
50
|
+
|
51
|
+
</div>
|
50
52
|
|
51
53
|
|
52
54
|
|
@@ -26,7 +26,8 @@
|
|
26
26
|
<div id="bodyContent">
|
27
27
|
<div id="content">
|
28
28
|
|
29
|
-
<div class="description"
|
29
|
+
<div class="description">
|
30
|
+
<p>
|
30
31
|
Provides painless, automatic configuration of <a
|
31
32
|
href="../../../classes/Dfect.html">Dfect</a>.
|
32
33
|
</p>
|
@@ -36,7 +37,8 @@ href="../../../classes/Dfect.html">Dfect</a> will be available for use
|
|
36
37
|
anywhere in your program and will execute all tests before your program
|
37
38
|
exits.
|
38
39
|
</p>
|
39
|
-
|
40
|
+
|
41
|
+
</div>
|
40
42
|
|
41
43
|
|
42
44
|
|
@@ -19,7 +19,7 @@
|
|
19
19
|
</h1>
|
20
20
|
<ul class="files">
|
21
21
|
<li>lib/dfect.rb</li>
|
22
|
-
<li>Last modified:
|
22
|
+
<li>Last modified: Tue Apr 28 22:21:44 -0700 2009</li>
|
23
23
|
</ul>
|
24
24
|
</div>
|
25
25
|
|
@@ -58,6 +58,8 @@
|
|
58
58
|
|
59
59
|
<li><span class="type">MODULE</span> <a href="../../classes/Dfect.html">Dfect</a></li>
|
60
60
|
|
61
|
+
<li><span class="type">CLASS</span> <a href="../../classes/Class.html">Class</a></li>
|
62
|
+
|
61
63
|
</ul>
|
62
64
|
|
63
65
|
|
data/doc/api/js/searchdoc.js
CHANGED
@@ -407,8 +407,7 @@ Searchdoc.Panel.prototype = $.extend({}, Searchdoc.Navigation, new function() {
|
|
407
407
|
html += '</h1>';
|
408
408
|
html += '<p>';
|
409
409
|
if (typeof badge != 'undefined') {
|
410
|
-
|
411
|
-
html += '<span class="badge badge_' + (badge + 1) + '">' + escapeHTML(this.data.badges[badge] || 'unknown') + '</span>';
|
410
|
+
html += '<span class="badge badge_' + (badge % 6 + 1) + '">' + escapeHTML(this.data.badges[badge] || 'unknown') + '</span>';
|
412
411
|
}
|
413
412
|
html += hlt(result.namespace) + '</p>';
|
414
413
|
if (result.snippet) html += '<p class="snippet">' + escapeHTML(result.snippet) + '</p>';
|
@@ -1 +1 @@
|
|
1
|
-
var search_data = {"index":{"
|
1
|
+
var search_data = {"index":{"longSearchIndex":["dfect.rb","auto.rb","dfect","dfect","dfect","dfect","dfect","dfect","dfect","dfect","dfect","dfect","dfect","dfect","dfect","dfect","dfect","dfect","dfect","files\/credits.html","files\/license.html","files\/lib\/dfect_rb.html","files\/lib\/dfect\/auto_rb.html"],"info":[["Dfect","lib\/dfect.rb","classes\/Dfect.html","","",1],["Object","lib\/dfect\/auto.rb","classes\/Object.html"," < Object","",1],["<","Dfect","classes\/Dfect.html#M000001","(*args, &block)","Registers the given block to be executed before each nested test inside this test. ==== Examples D .<",2],["<<","Dfect","classes\/Dfect.html#M000003","(&block)","Registers the given block to be executed before all nested tests inside this test. ==== Examples D .<<",2],[">","Dfect","classes\/Dfect.html#M000002","(&block)","Registers the given block to be executed after each nested test inside this test. ==== Examples D .>",2],[">>","Dfect","classes\/Dfect.html#M000004","(&block)","Registers the given block to be executed after all nested tests inside this test. ==== Examples D .>>",2],["C","Dfect","classes\/Dfect.html#M000012","(message = nil, symbol = nil, &block)","Asserts that the given symbol is thrown when the given block is executed. If a value is thrown along",2],["C!","Dfect","classes\/Dfect.html#M000013","(message = nil, symbol = nil, &block)","Asserts that the given symbol is not thrown when the given block is executed. Returns nil, always. ====",2],["C?","Dfect","classes\/Dfect.html#M000014","(message = nil, symbol = nil, &block)","Returns true if the given symbol is thrown when the given block is executed. Otherwise, returns false.",2],["D","Dfect","classes\/Dfect.html#M000000","(description = caller.first, &block)","Defines a new test, composed of the given description and the given block to execute. A test may contain",2],["E","Dfect","classes\/Dfect.html#M000009","(message = nil, *kinds, &block)","Asserts that one of the given kinds of exceptions is raised when the given block is executed. If the",2],["E!","Dfect","classes\/Dfect.html#M000010","(message = nil, *kinds, &block)","Asserts that one of the given kinds of exceptions is not raised when the given block is executed. If",2],["E?","Dfect","classes\/Dfect.html#M000011","(message = nil, *kinds, &block)","Returns true if one of the given kinds of exceptions is raised when the given block is executed. Otherwise,",2],["F?","Dfect","classes\/Dfect.html#M000008","(message = nil, &block)","Returns true if the result of the given block is either nil or false. Otherwise, returns false. ====",2],["T","Dfect","classes\/Dfect.html#M000005","(message = nil, &block)","Asserts that the result of the given block is neither nil nor false and returns that result. ==== Parameters",2],["T!","Dfect","classes\/Dfect.html#M000006","(message = nil, &block)","Asserts that the result of the given block is either nil or false and returns that result. ==== Parameters",2],["T?","Dfect","classes\/Dfect.html#M000007","(message = nil, &block)","Returns true if the result of the given block is neither nil nor false. Otherwise, returns false. ====",2],["run","Dfect","classes\/Dfect.html#M000015","()","Executes all tests defined thus far and stores the results in #report. ",2],["stop","Dfect","classes\/Dfect.html#M000016","()","Stops the execution of the #run method or raises an exception if that method is not currently executing.",2],["CREDITS","files\/CREDITS.html","files\/CREDITS.html","","* [Fran\u00e7ois Beausoleil](http:\/\/github.com\/francois) ",3],["LICENSE","files\/LICENSE.html","files\/LICENSE.html","","(the ISC license) Copyright 2009 Suraj N. Kurapati <sunaku@gmail.com> Permission to use, copy, modify,",3],["dfect.rb","files\/lib\/dfect_rb.html","files\/lib\/dfect_rb.html",""," ",3],["auto.rb","files\/lib\/dfect\/auto_rb.html","files\/lib\/dfect\/auto_rb.html","","Provides painless, automatic configuration of Dfect. Simply require() this file and Dfect will be available",3]],"searchIndex":["dfect","object","<()","<<()",">()",">>()","c()","c!()","c?()","d()","e()","e!()","e?()","f?()","t()","t!()","t?()","run()","stop()","credits","license","dfect.rb","auto.rb"]}}
|
data/doc/history.erb
CHANGED
@@ -1,4 +1,33 @@
|
|
1
1
|
%|chapter "History"
|
2
|
-
%|
|
2
|
+
%|history
|
3
|
+
%|section "Version 0.1.0 (2009-04-28)"
|
4
|
+
This release adds new variations to assertion methods, fixes several bugs, and improves test coverage.
|
5
|
+
|
6
|
+
%|paragraph "Thank you"
|
7
|
+
* François Beausoleil contributed patches for both code *and* tests! :-)
|
8
|
+
|
9
|
+
%|paragraph "New features"
|
10
|
+
* Added <%= xref "Negation", "negation (m!)" %> and <%= xref "Sampling", "sampling (m?)" %> variations to <%= xref "Assertions", "assertion methods" %>.
|
11
|
+
|
12
|
+
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.
|
13
|
+
|
14
|
+
* Added documentation on <%= xref "Insulation", "how to insulate tests" %> from the global Ruby namespace.
|
15
|
+
|
16
|
+
%|paragraph "Bug fixes"
|
17
|
+
* The `E()` method did not consider the case where a block does not raise anything as a failure. ---*François Beausoleil*
|
18
|
+
|
19
|
+
* When creating a report about an assertion failure, an exception would be thrown if any local variables pointed to an empty array.
|
20
|
+
|
21
|
+
* The `Dfect::<()` method broke the inheritance-checking behavior of the < class method.
|
22
|
+
|
23
|
+
Added a bypass to the originial behavior so that `RCov::XX` can properly generate a report about code that uses Dfect.
|
24
|
+
|
25
|
+
* Added workaround for YAML error when serializing a class object:
|
26
|
+
|
27
|
+
TypeError: can't dump anonymous class Class
|
28
|
+
|
29
|
+
%|paragraph "Housekeeping"
|
30
|
+
* Filled the big holes in test coverage. Everything except the runtime debugging logic is now covered by the unit tests.
|
31
|
+
|
3
32
|
%|section "Version 0.0.0 (2009-04-13)"
|
4
|
-
This is the first public release of
|
33
|
+
This is the first public release of <%= $project %>. It was inspired by [Sean O'Halpin's musing](http://www.ruby-forum.com/topic/183354#801895) on alternative names for assertion methods.
|