dfect 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CREDITS +1 -0
- data/doc/api/apple-touch-icon.png +0 -0
- data/doc/api/classes/Dfect.html +92 -32
- data/doc/api/classes/Kernel.html +8 -8
- data/doc/api/classes/Object.html +1 -1
- data/doc/api/created.rid +1 -1
- data/doc/api/favicon.ico +0 -0
- data/doc/api/files/CREDITS.html +4 -1
- data/doc/api/files/LICENSE.html +1 -1
- data/doc/api/files/lib/dfect/auto_rb.html +1 -1
- data/doc/api/files/lib/dfect/mini_rb.html +1 -1
- data/doc/api/files/lib/dfect/spec_rb.html +1 -3
- data/doc/api/files/lib/dfect/unit_rb.html +1 -1
- data/doc/api/files/lib/dfect_rb.html +1 -1
- data/doc/api/js/searchdoc.js +38 -15
- data/doc/api/panel/index.html +13 -5
- data/doc/api/panel/search_index.js +1 -1
- data/doc/api/panel/tree.js +1 -1
- data/doc/history.erb +92 -12
- data/doc/index.erb +2 -2
- data/doc/index.html +2323 -0
- data/doc/intro.erb +45 -68
- data/doc/setup.erb +91 -7
- data/doc/usage.erb +214 -154
- data/lib/dfect/auto.rb +4 -4
- data/lib/dfect/mini.rb +7 -2
- data/lib/dfect/spec.rb +2 -3
- data/lib/dfect/unit.rb +11 -4
- data/lib/dfect.rb +24 -3
- data/rakefile +4 -4
- data/test/dfect.rb +2 -2
- metadata +9 -5
- data/doc/index.xhtml +0 -833
data/doc/intro.erb
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
%#--
|
2
|
-
%# Copyright
|
3
|
-
%# See
|
2
|
+
%# Copyright protects this work.
|
3
|
+
%# See LICENSE file for details.
|
4
4
|
%#++
|
5
5
|
|
6
6
|
% api_url = './api/index.html'
|
7
7
|
% src_url = 'http://github.com/sunaku/' + $program
|
8
8
|
% git_url = 'http://git-scm.com'
|
9
|
+
|
9
10
|
<%
|
10
|
-
|
11
|
+
related_works = {
|
11
12
|
'assert{ 2.0 }' => 'http://assert2.rubyforge.org',
|
12
13
|
'Verify' => 'http://www.ruby-forum.com/topic/183354',
|
13
14
|
'Testy' => 'http://github.com/ahoward/testy/tree/master',
|
@@ -20,7 +21,7 @@
|
|
20
21
|
'Test::Unit' => 'http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/index.html',
|
21
22
|
}
|
22
23
|
|
23
|
-
def
|
24
|
+
def related_works.link_for key
|
24
25
|
if val = self[key]
|
25
26
|
"[#{key}](#{val})"
|
26
27
|
else
|
@@ -29,28 +30,33 @@
|
|
29
30
|
end
|
30
31
|
%>
|
31
32
|
|
33
|
+
|
32
34
|
%|chapter "Introduction"
|
35
|
+
|
36
|
+
|
33
37
|
%|project
|
38
|
+
|
34
39
|
<%= $project %> is an assertion testing library for Ruby that emphasizes a simple assertion vocabulary, instant debuggability of failures, and flexibility in composing tests.
|
35
40
|
|
41
|
+
|
42
|
+
* <%= xref "History", "What's new?" %> --- history of project releases.
|
43
|
+
* [Source code](<%= src_url %>) --- obtain via [Git](<%= git_url %>) or browse online.
|
44
|
+
* [API reference](<%= api_url %>) --- documentation for source code.
|
45
|
+
* [Project home](<%= $website %>) --- the <%= $project %> project home page.
|
46
|
+
|
47
|
+
To get help or provide feedback, simply
|
48
|
+
<%= xref "License", "contact the author(s)" %>.
|
49
|
+
|
50
|
+
|
51
|
+
%|section "Features"
|
52
|
+
|
36
53
|
<%= $project %> is exciting because:
|
37
54
|
* It has only 5 methods to remember: D F E C T.
|
38
55
|
* It lets you debug assertion failures interactively.
|
39
56
|
* It keeps a detailed report of assertion failures.
|
40
57
|
* It lets you nest tests and execution hooks.
|
41
|
-
*
|
42
|
-
|
43
|
-
These features distinguish <%= $project %> from the competition:
|
44
|
-
|
45
|
-
%|competitors.keys.sort_by {|name| name.downcase }.each do |name|
|
46
|
-
* <%= competitors.link_for name %>
|
47
|
-
|
48
|
-
%|paragraph "Etymology"
|
49
|
-
<%= $project %> is named after the D F E C T methods it provides.
|
50
|
-
|
51
|
-
The name is also play on the word "defect", whereby the intentional misspelling of "defect" as "dfect" is a defect in itself! <tt>;-)</tt>
|
58
|
+
* Its core consists of a mere <%= `sloccount lib/dfect.rb`[/^\d+/] %> lines of code.
|
52
59
|
|
53
|
-
This wordplay is similar to [Mnesia](http://www.erlang.org/doc/apps/mnesia/index.html)'s play on the word "amnesia", whereby the intentional omission of the letter "A" indicates forgetfulness---the key characteristic of having amnesia. Clever!
|
54
60
|
|
55
61
|
%|section "Motivation"
|
56
62
|
The basic premise of <%= $project %> is that, when a failure occurs, I want to be put inside an interactive debugger where I have the freedom to properly scrutinize the state of my program and determine the root cause of the failure.
|
@@ -67,61 +73,32 @@
|
|
67
73
|
|
68
74
|
And that, I say, is why <%= $project %> is essential to Ruby developers today. It reunites us with our playful, interactive, *real-time* IRB roots and, with unwavering tenacity, enables us to investigate failures *productively*!
|
69
75
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<table markdown="1">
|
86
|
-
<thead>
|
87
|
-
<tr>
|
88
|
-
<td rowspan="2">What increased in the version number?</td>
|
89
|
-
<td colspan="3">The increase indicates that the release:</td>
|
90
|
-
</tr>
|
91
|
-
<tr>
|
92
|
-
<th>Is backward compatible?</th>
|
93
|
-
<th>Has new features?</th>
|
94
|
-
<th>Has bug fixes?</th>
|
95
|
-
</tr>
|
96
|
-
</thead>
|
97
|
-
<tbody>
|
98
|
-
<tr>
|
99
|
-
<th>major</th>
|
100
|
-
<td style="background-color: #FFE4E1;">No</td>
|
101
|
-
<td>Yes</td>
|
102
|
-
<td>Yes</td>
|
103
|
-
</tr>
|
104
|
-
<tr>
|
105
|
-
<th>minor</th>
|
106
|
-
<td>Yes</td>
|
107
|
-
<td>Yes</td>
|
108
|
-
<td>Yes</td>
|
109
|
-
</tr>
|
110
|
-
<tr>
|
111
|
-
<th>patch</th>
|
112
|
-
<td>Yes</td>
|
113
|
-
<td style="background-color: #FFE4E1;">No</td>
|
114
|
-
<td>Yes</td>
|
115
|
-
</tr>
|
116
|
-
</tbody>
|
117
|
-
</table>
|
118
|
-
|
119
|
-
%|paragraph "License"
|
120
|
-
%< "../LICENSE"
|
76
|
+
|
77
|
+
%|section "Etymology"
|
78
|
+
|
79
|
+
<%= $project %> is named after the D F E C T methods it provides.
|
80
|
+
|
81
|
+
The name is also play on the word "defect", whereby the intentional misspelling of "defect" as "dfect" is a defect in itself! <tt>;-)</tt>
|
82
|
+
|
83
|
+
This wordplay is similar to [Mnesia](http://www.erlang.org/doc/apps/mnesia/index.html)'s play on the word "amnesia", whereby the intentional omission of the letter "A" indicates forgetfulness---the key characteristic of having amnesia. Clever!
|
84
|
+
|
85
|
+
|
86
|
+
%|section "License"
|
87
|
+
|
88
|
+
%< "../LICENSE"
|
89
|
+
|
121
90
|
|
122
91
|
%|section "Credits"
|
92
|
+
|
123
93
|
<%= $project %> is made possible by
|
124
|
-
|
94
|
+
%= xref "History", "contributions"
|
125
95
|
from users like you:
|
126
96
|
|
127
97
|
%< "../CREDITS"
|
98
|
+
|
99
|
+
|
100
|
+
%|section "Related works"
|
101
|
+
|
102
|
+
%|related_works.keys.sort_by {|name| name.downcase }.each do |name|
|
103
|
+
* <%= related_works.link_for name %>
|
104
|
+
|
data/doc/setup.erb
CHANGED
@@ -1,19 +1,51 @@
|
|
1
1
|
%#--
|
2
|
-
%# Copyright
|
3
|
-
%# See
|
2
|
+
%# Copyright protects this work.
|
3
|
+
%# See LICENSE file for details.
|
4
4
|
%#++
|
5
5
|
|
6
|
+
|
6
7
|
%|chapter "Setup"
|
8
|
+
|
9
|
+
|
7
10
|
%|section "Requirements"
|
11
|
+
|
8
12
|
Your system needs the following software to run <%= $project %>.
|
9
13
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
14
|
+
%|table
|
15
|
+
%|thead
|
16
|
+
%|tr
|
17
|
+
%|th
|
18
|
+
Software
|
19
|
+
%|th
|
20
|
+
Description
|
21
|
+
%|th
|
22
|
+
Notes
|
23
|
+
%|tbody
|
24
|
+
%|tr
|
25
|
+
%|td
|
26
|
+
[Ruby](http://ruby-lang.org)
|
27
|
+
%|td
|
28
|
+
Ruby language interpreter
|
29
|
+
%|td
|
30
|
+
Version 1.8.6, 1.8.7, and 1.9.1 have been tested successfully.
|
31
|
+
%|tr
|
32
|
+
%|td
|
33
|
+
[RubyGems](http://rubygems.org)
|
34
|
+
%|td
|
35
|
+
Ruby packaging system
|
36
|
+
%|td
|
37
|
+
Version 1.3.1 is or newer required.
|
38
|
+
%|tr
|
39
|
+
%|td
|
40
|
+
[ruby-debug](http://www.datanoise.com/ruby-debug)
|
41
|
+
%|td
|
42
|
+
Interactive debugger
|
43
|
+
%|td
|
44
|
+
**This requirement is optional.** If this library is not available, then IRB (the standard interactive Ruby shell) will be used instead.
|
45
|
+
|
15
46
|
|
16
47
|
%|section "Installation"
|
48
|
+
|
17
49
|
You can install <%= $project %> by running this command:
|
18
50
|
|
19
51
|
gem install <%= $program %>
|
@@ -21,3 +53,55 @@
|
|
21
53
|
If you want to develop <%= $project %>, run this command:
|
22
54
|
|
23
55
|
gem install <%= $program %> --development
|
56
|
+
|
57
|
+
|
58
|
+
%|section "Version numbers"
|
59
|
+
|
60
|
+
<%= $project %> releases are numbered in *major.minor.patch*
|
61
|
+
form according to the [RubyGems rational versioning
|
62
|
+
policy](http://www.rubygems.org/read/chapter/7), which
|
63
|
+
can be summarized as follows:
|
64
|
+
|
65
|
+
%|table
|
66
|
+
%|thead
|
67
|
+
%|tr
|
68
|
+
%|td :rowspan => 2
|
69
|
+
What increased in the version number?
|
70
|
+
%|td :colspan => 3
|
71
|
+
The increase indicates that the release:
|
72
|
+
%|tr
|
73
|
+
%|th
|
74
|
+
Is backward compatible?
|
75
|
+
%|th
|
76
|
+
Has new features?
|
77
|
+
%|th
|
78
|
+
Has bug fixes?
|
79
|
+
%|tbody
|
80
|
+
%|tr
|
81
|
+
%|th
|
82
|
+
major
|
83
|
+
%|td :style => "background-color: #FFE4E1;"
|
84
|
+
No
|
85
|
+
%|td
|
86
|
+
Yes
|
87
|
+
%|td
|
88
|
+
Yes
|
89
|
+
%|tr
|
90
|
+
%|th
|
91
|
+
minor
|
92
|
+
%|td
|
93
|
+
Yes
|
94
|
+
%|td
|
95
|
+
Yes
|
96
|
+
%|td
|
97
|
+
Yes
|
98
|
+
%|tr
|
99
|
+
%|th
|
100
|
+
patch
|
101
|
+
%|td
|
102
|
+
Yes
|
103
|
+
%|td :style => "background-color: #FFE4E1;"
|
104
|
+
No
|
105
|
+
%|td
|
106
|
+
Yes
|
107
|
+
|