dfect 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CREDITS +20 -2
- data/bin/dfect +12 -43
- data/lib/dfect/full.rb +24 -0
- data/lib/dfect/inochi.rb +8 -17
- data/man.html +947 -0
- data/man/man1/dfect.1.gz +0 -0
- metadata +19 -35
- data/HISTORY +0 -327
- data/INSTALL +0 -35
- data/MANUAL +0 -23
- data/README +0 -95
- data/USAGE +0 -406
- data/doc/api/Dfect.html +0 -3470
- data/doc/api/Object.html +0 -111
- data/doc/api/_index.html +0 -107
- data/doc/api/class_list.html +0 -36
- data/doc/api/css/common.css +0 -1
- data/doc/api/css/full_list.css +0 -50
- data/doc/api/css/style.css +0 -273
- data/doc/api/file.LICENSE.html +0 -73
- data/doc/api/file_list.html +0 -38
- data/doc/api/frames.html +0 -13
- data/doc/api/index.html +0 -73
- data/doc/api/js/app.js +0 -111
- data/doc/api/js/full_list.js +0 -117
- data/doc/api/js/jquery.js +0 -19
- data/doc/api/method_list.html +0 -347
- data/doc/api/top-level-namespace.html +0 -89
- data/doc/index.html +0 -2750
- data/inochi.opts +0 -31
- data/test/dfect_test.rb +0 -449
- data/test/runner +0 -25
- data/test/test_helper.rb +0 -1
data/man/man1/dfect.1.gz
ADDED
Binary file
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 2
|
7
|
-
-
|
7
|
+
- 2
|
8
8
|
- 0
|
9
|
-
version: 2.
|
9
|
+
version: 2.2.0
|
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-
|
17
|
+
date: 2010-04-28 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -22,14 +22,21 @@ dependencies:
|
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 3
|
29
|
+
- 0
|
30
|
+
- 0
|
31
|
+
version: 3.0.0
|
32
|
+
- - <
|
26
33
|
- !ruby/object:Gem::Version
|
27
34
|
segments:
|
28
|
-
-
|
29
|
-
version: "
|
35
|
+
- 4
|
36
|
+
version: "4"
|
30
37
|
type: :development
|
31
38
|
version_requirements: *id001
|
32
|
-
description:
|
39
|
+
description: Dfect is an assertion testing library for Ruby that emphasizes a simple assertion vocabulary, instant debuggability of failures, and flexibility in composing tests.
|
33
40
|
email:
|
34
41
|
executables:
|
35
42
|
- dfect
|
@@ -38,41 +45,18 @@ extensions: []
|
|
38
45
|
extra_rdoc_files: []
|
39
46
|
|
40
47
|
files:
|
41
|
-
-
|
42
|
-
- inochi.opts
|
43
|
-
- INSTALL
|
44
|
-
- MANUAL
|
45
|
-
- test/runner
|
46
|
-
- test/test_helper.rb
|
47
|
-
- test/dfect_test.rb
|
48
|
+
- bin/dfect
|
48
49
|
- lib/dfect/inochi.rb
|
50
|
+
- lib/dfect/full.rb
|
49
51
|
- lib/dfect/auto.rb
|
50
52
|
- lib/dfect/mini.rb
|
51
53
|
- lib/dfect/unit.rb
|
52
54
|
- lib/dfect/spec.rb
|
53
55
|
- lib/dfect.rb
|
54
|
-
- bin/dfect
|
55
|
-
- USAGE
|
56
56
|
- LICENSE
|
57
|
-
-
|
58
|
-
-
|
59
|
-
-
|
60
|
-
- doc/api/class_list.html
|
61
|
-
- doc/api/js/full_list.js
|
62
|
-
- doc/api/js/jquery.js
|
63
|
-
- doc/api/js/app.js
|
64
|
-
- doc/api/method_list.html
|
65
|
-
- doc/api/css/full_list.css
|
66
|
-
- doc/api/css/style.css
|
67
|
-
- doc/api/css/common.css
|
68
|
-
- doc/api/Object.html
|
69
|
-
- doc/api/_index.html
|
70
|
-
- doc/api/frames.html
|
71
|
-
- doc/api/top-level-namespace.html
|
72
|
-
- doc/api/index.html
|
73
|
-
- doc/api/Dfect.html
|
74
|
-
- doc/api/file.LICENSE.html
|
75
|
-
- doc/api/file_list.html
|
57
|
+
- CREDITS
|
58
|
+
- man.html
|
59
|
+
- man/man1/dfect.1.gz
|
76
60
|
has_rdoc: true
|
77
61
|
homepage: http://snk.tuxfamily.org/lib/dfect/
|
78
62
|
licenses: []
|
data/HISTORY
DELETED
@@ -1,327 +0,0 @@
|
|
1
|
-
%# #%
|
2
|
-
%# You can read this document in its full glory by #%
|
3
|
-
%# opening ./doc/index.html in your favorite Web browser. #%
|
4
|
-
%# #%
|
5
|
-
|
6
|
-
%#----------------------------------------------------------------------------
|
7
|
-
%| section "Version 2.1.0 (2010-03-31)"
|
8
|
-
%#----------------------------------------------------------------------------
|
9
|
-
|
10
|
-
This release adds a <%= xref "Shell command", "command-line test runner" %>
|
11
|
-
and performs some minor housekeeping.
|
12
|
-
|
13
|
-
%#--------------------------------------------------------------------------
|
14
|
-
%| paragraph "New features"
|
15
|
-
%#--------------------------------------------------------------------------
|
16
|
-
|
17
|
-
* Add `bin/dfect` executable as command-line interface to this library.
|
18
|
-
|
19
|
-
%#--------------------------------------------------------------------------
|
20
|
-
%| paragraph "Housekeeping"
|
21
|
-
%#--------------------------------------------------------------------------
|
22
|
-
|
23
|
-
* Do not `require 'rubygems'` before loading the "ruby-debug" library.
|
24
|
-
|
25
|
-
* Upgrade to Inochi 2.0.0-rc2 for managing this project.
|
26
|
-
|
27
|
-
%#----------------------------------------------------------------------------
|
28
|
-
%| section "Version 2.0.0 (2010-03-21)"
|
29
|
-
%#----------------------------------------------------------------------------
|
30
|
-
|
31
|
-
This release adds the ability to insulate tests from each other, share code
|
32
|
-
between them, makes the order of parameters consistent in the API, improves
|
33
|
-
user interactivity, fixes some bugs, and revises the user manual.
|
34
|
-
|
35
|
-
%#--------------------------------------------------------------------------
|
36
|
-
%| paragraph "Incompatible changes"
|
37
|
-
%#--------------------------------------------------------------------------
|
38
|
-
|
39
|
-
* Root-level calls to the `Dfect::D()` method are <%=
|
40
|
-
xref "Insulation", "automatically insulated" %> now.
|
41
|
-
|
42
|
-
* The `Dfect::E()` methods now expects its optional message
|
43
|
-
parameter to be the *last parameter* in the parameter list.
|
44
|
-
|
45
|
-
* The `Dfect::C()` methods now expect their first parameter to be a symbol
|
46
|
-
instead of the optional message to be shown in case of assertion failure.
|
47
|
-
|
48
|
-
* The `Dfect::R()` has been renamed to `Dfect::L()`,
|
49
|
-
which is a mnemonic for <%= xref "Logging" %>.
|
50
|
-
|
51
|
-
* Shorten names of hash keys in the execution trace for brevity
|
52
|
-
and rename `:raise` key in report statistics to `:error`.
|
53
|
-
|
54
|
-
* Only the most helpful subset of the failure details is shown before
|
55
|
-
placing the user into a debugger because they can query the omitted
|
56
|
-
information (on demand) inside the debugger.
|
57
|
-
|
58
|
-
* The execution trace is only shown if all tests passed in `Dfect::run()`.
|
59
|
-
|
60
|
-
* The `:debug` option is now set to Ruby's `$DEBUG` global by default.
|
61
|
-
|
62
|
-
%#--------------------------------------------------------------------------
|
63
|
-
%| paragraph "New features"
|
64
|
-
%#--------------------------------------------------------------------------
|
65
|
-
|
66
|
-
* Print failures as they occur instead of waiting until the end.
|
67
|
-
|
68
|
-
* Allow passing condition as argument to true/false assertions instead
|
69
|
-
of requiring the condition to be passed as a code block, and also fall
|
70
|
-
back to the binding of inner-most enclosing test or hook when
|
71
|
-
debugging or constructing a failure report for an assertion that was
|
72
|
-
not given a block.
|
73
|
-
|
74
|
-
This allows you to reduce "line noise" in your tests:
|
75
|
-
|
76
|
-
%|code :ruby
|
77
|
-
D "Lottery" do
|
78
|
-
winning_ticket = rand()
|
79
|
-
|
80
|
-
D "My chances of winning" do
|
81
|
-
my_ticket = rand()
|
82
|
-
F my_ticket == winning_ticket, "I won?! Dream on."
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
%# XXX: this line protects the following list item from the above code
|
87
|
-
* Add <%= xref "Sharing", "`Dfect::S()` methods" %>
|
88
|
-
for sharing code between tests.
|
89
|
-
|
90
|
-
* Add <%= xref "Insulation", "`Dfect::D!()` method" %>
|
91
|
-
to explicitly insulate a test from other tests, the
|
92
|
-
top-level Ruby environment, and the code being tested.
|
93
|
-
|
94
|
-
* Add `Dfect::info()` method which returns the details of
|
95
|
-
the failure that is currently being debugged by the user.
|
96
|
-
|
97
|
-
* Add instance variables to the `:vars` section of a failure report.
|
98
|
-
|
99
|
-
* Add `setup!()` and `teardown!()` methods for before-all and
|
100
|
-
after-all hooks in the <tt>dfect/unit</tt> emulation library.
|
101
|
-
|
102
|
-
* Add test execution time to statistics hash (under the `:time` key).
|
103
|
-
|
104
|
-
%#--------------------------------------------------------------------------
|
105
|
-
%| paragraph "Bug fixes"
|
106
|
-
%#--------------------------------------------------------------------------
|
107
|
-
|
108
|
-
* Do not print any output when `:quiet` option is active.
|
109
|
-
|
110
|
-
* Allow passing multiple strings/objects to `Dfect::D()` like in RSpec.
|
111
|
-
|
112
|
-
* Make before and after hook methods mixin-able like assertions.
|
113
|
-
|
114
|
-
* Do not assume that `Module#to_s` is the same as `Module#name`.
|
115
|
-
|
116
|
-
%#--------------------------------------------------------------------------
|
117
|
-
%| paragraph "Housekeeping"
|
118
|
-
%#--------------------------------------------------------------------------
|
119
|
-
|
120
|
-
* Upgrade to Inochi 2.0.0-rc1 for managing this project.
|
121
|
-
|
122
|
-
* Make emulation libraries modify Dfect module instead of Kernel.
|
123
|
-
|
124
|
-
* Do not pollute the user's output with our `Class#to_yaml` workaround.
|
125
|
-
|
126
|
-
* Remove "Motivation" section from user manual. It was too fanatic!
|
127
|
-
|
128
|
-
%#----------------------------------------------------------------------------
|
129
|
-
%| section "Version 1.1.0 (2009-10-27)"
|
130
|
-
%#----------------------------------------------------------------------------
|
131
|
-
|
132
|
-
This release adds a new method for emitting status messages and does some
|
133
|
-
internal housekeeping.
|
134
|
-
|
135
|
-
%#--------------------------------------------------------------------------
|
136
|
-
%| paragraph "Thank you"
|
137
|
-
%#--------------------------------------------------------------------------
|
138
|
-
|
139
|
-
* Iñaki Baz Castillo used Dfect and suggested new features.
|
140
|
-
|
141
|
-
%#--------------------------------------------------------------------------
|
142
|
-
%| paragraph "New features"
|
143
|
-
%#--------------------------------------------------------------------------
|
144
|
-
|
145
|
-
* Add `Dfect::S()` method for <%= xref "Logging", "adding status
|
146
|
-
messages" %> to the execution report. This feature was [requested
|
147
|
-
by](http://github.com/sunaku/dfect/issues/closed#issue/1) Iñaki Baz
|
148
|
-
Castillo.
|
149
|
-
|
150
|
-
%#--------------------------------------------------------------------------
|
151
|
-
%| paragraph "Housekeeping"
|
152
|
-
%#--------------------------------------------------------------------------
|
153
|
-
|
154
|
-
* Remove unused require of 'delegate' standard library in 'dfect/spec'
|
155
|
-
RSpec emulation layer.
|
156
|
-
|
157
|
-
* Mention <%= xref "Emulation" %> layers for popular testing libraries.
|
158
|
-
|
159
|
-
* Mention that assertions take an optional message parameter.
|
160
|
-
|
161
|
-
* Replace sample unit test with Dfect test suite.
|
162
|
-
|
163
|
-
* Upgrade user manual to ERBook 9.0.0.
|
164
|
-
|
165
|
-
%#----------------------------------------------------------------------------
|
166
|
-
%| section "Version 1.0.1 (2009-10-07)"
|
167
|
-
%#----------------------------------------------------------------------------
|
168
|
-
|
169
|
-
This release fixes a bug in the Test::Unit emulation library and revises the
|
170
|
-
user manual.
|
171
|
-
|
172
|
-
%#--------------------------------------------------------------------------
|
173
|
-
%| paragraph "Bug fixes"
|
174
|
-
%#--------------------------------------------------------------------------
|
175
|
-
|
176
|
-
* The parameters for the `assert_equal()` method in the
|
177
|
-
<tt>dfect/unit</tt> library were in the wrong order.
|
178
|
-
|
179
|
-
%#--------------------------------------------------------------------------
|
180
|
-
%| paragraph "Housekeeping"
|
181
|
-
%#--------------------------------------------------------------------------
|
182
|
-
|
183
|
-
* Revise user manual to better fit jQuery UI tabs.
|
184
|
-
|
185
|
-
* Justify the use of `eval()` in emulation libraries.
|
186
|
-
|
187
|
-
* Use simpler Copyright reminder at the top of every file.
|
188
|
-
|
189
|
-
* Make SLOC count in user manual reflect the *core* library only.
|
190
|
-
|
191
|
-
* Mark code spans with `{:lang=ruby}` instead of HTML `<code/>` tags.
|
192
|
-
|
193
|
-
* Open source is for fun, so [be nice][1] and speak of "related works"
|
194
|
-
instead of "competitors".
|
195
|
-
|
196
|
-
[1]: http://loiclemeur.com/english/2009/03/never-criticize-your-competitors.html
|
197
|
-
|
198
|
-
%#----------------------------------------------------------------------------
|
199
|
-
%| section "Version 1.0.0 (2009-05-03)"
|
200
|
-
%#----------------------------------------------------------------------------
|
201
|
-
|
202
|
-
This release improves default choices, adds emulation layers to mimic other
|
203
|
-
testing libraries, and fixes some bugs.
|
204
|
-
|
205
|
-
%#--------------------------------------------------------------------------
|
206
|
-
%| paragraph "Incompatible changes"
|
207
|
-
%#--------------------------------------------------------------------------
|
208
|
-
|
209
|
-
* The `:debug` option is now enabled by default and is no longer linked to
|
210
|
-
the value of `$DEBUG`.
|
211
|
-
|
212
|
-
* `Dfect.run()` now appends to previous results by default.
|
213
|
-
|
214
|
-
This behavior can be disabled by passing `false` to the method.
|
215
|
-
|
216
|
-
%#--------------------------------------------------------------------------
|
217
|
-
%| paragraph "New features"
|
218
|
-
%#--------------------------------------------------------------------------
|
219
|
-
|
220
|
-
* Add emulation layers to mimic other testing libraries:
|
221
|
-
* <tt>dfect/unit</tt> --- Test::Unit
|
222
|
-
* <tt>dfect/mini</tt> --- Minitest
|
223
|
-
* <tt>dfect/spec</tt> --- RSpec
|
224
|
-
|
225
|
-
%#--------------------------------------------------------------------------
|
226
|
-
%| paragraph "Bug fixes"
|
227
|
-
%#--------------------------------------------------------------------------
|
228
|
-
|
229
|
-
* Do not blindly replace `Class#to_yaml`; it might be fixed someday.
|
230
|
-
|
231
|
-
%#--------------------------------------------------------------------------
|
232
|
-
%| paragraph "Housekeeping"
|
233
|
-
%#--------------------------------------------------------------------------
|
234
|
-
|
235
|
-
* Add "Motivation" section in user manual to promote interactive
|
236
|
-
debugging.
|
237
|
-
|
238
|
-
* Add brief <%= xref "History" %> of this project's inception.
|
239
|
-
|
240
|
-
* Remove redundant assertions for F!() and T!() methods in test suite.
|
241
|
-
|
242
|
-
* Add copyright notice at the top of every file.
|
243
|
-
|
244
|
-
%#----------------------------------------------------------------------------
|
245
|
-
%| section "Version 0.1.0 (2009-04-28)"
|
246
|
-
%#----------------------------------------------------------------------------
|
247
|
-
|
248
|
-
This release adds new variations to assertion methods, fixes several bugs,
|
249
|
-
and improves test coverage.
|
250
|
-
|
251
|
-
%#--------------------------------------------------------------------------
|
252
|
-
%| paragraph "Thank you"
|
253
|
-
%#--------------------------------------------------------------------------
|
254
|
-
|
255
|
-
* François Beausoleil contributed patches for both code *and* tests! :-)
|
256
|
-
|
257
|
-
%#--------------------------------------------------------------------------
|
258
|
-
%| paragraph "New features"
|
259
|
-
%#--------------------------------------------------------------------------
|
260
|
-
|
261
|
-
* Added <%= xref "Negation", "negation (m!)" %> and <%=
|
262
|
-
xref "Sampling", "sampling (m?)" %> variations to <%=
|
263
|
-
xref "Assertions", "assertion methods" %>.
|
264
|
-
|
265
|
-
These new methods implement assertion functionality missing so far
|
266
|
-
(previously we could not assert that a given exception was NOT thrown)
|
267
|
-
and thereby allow us to fully test Dfect using itself.
|
268
|
-
|
269
|
-
* Added documentation on <%= xref "Insulation", "how to insulate tests" %>
|
270
|
-
from the global Ruby namespace.
|
271
|
-
|
272
|
-
%#--------------------------------------------------------------------------
|
273
|
-
%| paragraph "Bug fixes"
|
274
|
-
%#--------------------------------------------------------------------------
|
275
|
-
|
276
|
-
* The `E()` method did not consider the case where a block does not raise
|
277
|
-
anything as a failure. ---*François Beausoleil*
|
278
|
-
|
279
|
-
* When creating a report about an assertion failure, an exception would be
|
280
|
-
thrown if any local variables pointed to an empty array.
|
281
|
-
|
282
|
-
* The `Dfect::<()` method broke the inheritance-checking behavior of the <
|
283
|
-
class method.
|
284
|
-
|
285
|
-
Added a bypass to the originial behavior so that `RCov::XX` can properly
|
286
|
-
generate a report about code that uses Dfect.
|
287
|
-
|
288
|
-
* Added workaround for YAML error when serializing a class object:
|
289
|
-
|
290
|
-
TypeError: can't dump anonymous class Class
|
291
|
-
|
292
|
-
%#--------------------------------------------------------------------------
|
293
|
-
%| paragraph "Housekeeping"
|
294
|
-
%#--------------------------------------------------------------------------
|
295
|
-
|
296
|
-
* Filled the big holes in test coverage. Everything except the runtime
|
297
|
-
debugging logic is now covered by the unit tests.
|
298
|
-
|
299
|
-
%#----------------------------------------------------------------------------
|
300
|
-
%| section "Version 0.0.0 (2009-04-13)"
|
301
|
-
%#----------------------------------------------------------------------------
|
302
|
-
|
303
|
-
For the longest time, I took Test::Unit and [RSpec](http://rspec.info) for
|
304
|
-
granted. They were the epitomy of modern Ruby practice; the insurmountable
|
305
|
-
status quo; immortalized in books, conferences, and blogs alike.
|
306
|
-
|
307
|
-
Why would *anyone* think of using anything remotely different, let alone be
|
308
|
-
foolish enough to write an alternative testing library when these are
|
309
|
-
clearly *good enough*?
|
310
|
-
|
311
|
-
Recent experiments in assertion testing libraries smashed my world view:
|
312
|
-
|
313
|
-
* [assert{ 2.0 }](http://assert2.rubyforge.org)
|
314
|
-
* [Testy](http://github.com/ahoward/testy/tree/master)
|
315
|
-
* [Verify](http://www.ruby-forum.com/topic/183354)
|
316
|
-
|
317
|
-
The status quo was certainly *not* "good enough", as I had so blindly
|
318
|
-
believed all these years. In fact, they were *verbose* behemoths that chose
|
319
|
-
to encode endless permutations of conjecture into methods.
|
320
|
-
|
321
|
-
Empowered by this revelation and inspired by [Sean O'Halpin's musing][1] on
|
322
|
-
alternative names for assertion methods, I rose to challenge the status quo.
|
323
|
-
|
324
|
-
And so I present to you the first public release of "Dfect".
|
325
|
-
|
326
|
-
[1]: http://www.ruby-forum.com/topic/183354#801895
|
327
|
-
|
data/INSTALL
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
%# #%
|
2
|
-
%# You can read this document in its full glory by #%
|
3
|
-
%# opening ./doc/index.html in your favorite Web browser. #%
|
4
|
-
%# #%
|
5
|
-
|
6
|
-
%#----------------------------------------------------------------------------
|
7
|
-
%| section "Prerequisites"
|
8
|
-
%#----------------------------------------------------------------------------
|
9
|
-
|
10
|
-
* [Ruby](http://ruby-lang.org) 1.8.6 or newer.
|
11
|
-
|
12
|
-
* [RubyGems](http://rubygems.org) 1.3.6 or newer.
|
13
|
-
|
14
|
-
* [ruby-debug](http://www.datanoise.com/ruby-debug) will
|
15
|
-
be used if it is available. Otherwise the standard
|
16
|
-
interactive Ruby shell (IRB) will be used instead.
|
17
|
-
|
18
|
-
%#----------------------------------------------------------------------------
|
19
|
-
%| section "Installing"
|
20
|
-
%#----------------------------------------------------------------------------
|
21
|
-
|
22
|
-
%|command! "gem install dfect"
|
23
|
-
|
24
|
-
%#----------------------------------------------------------------------------
|
25
|
-
%| section "Upgrading"
|
26
|
-
%#----------------------------------------------------------------------------
|
27
|
-
|
28
|
-
%|command! "gem update dfect"
|
29
|
-
|
30
|
-
%#----------------------------------------------------------------------------
|
31
|
-
%| section "Uninstalling"
|
32
|
-
%#----------------------------------------------------------------------------
|
33
|
-
|
34
|
-
%|command! "gem uninstall dfect"
|
35
|
-
|