-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHISTORY
465 lines (286 loc) · 13.9 KB
/
HISTORY
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
== HISTORY
=== Version 3.1.3 (2011-04-22)
This release fixes bugs in the Test::Unit emulation layer.
.Bug fixes
* `assert_send()` did not follow Test::Unit syntax.
* `assert_operator()` did not set failure message.
.Housekeeping
* Upgrade to Inochi 6.0.2.
=== Version 3.1.2 (2010-08-10)
This release adds links to API documentation beside methods mentioned in the
help manual and restores metadata that was missing in the gem release package.
.Housekeeping
* Upgrade to Inochi 5.0.1 to fix metadata generation in gemspec.
* Introduce assertions before tests in help manual.
* Make use of AsciiDoc admonitions and icon images.
* Add links into API documentation for core methods.
* Add test case to ensure that `E()` returns the exception that was raised.
=== Version 3.1.1 (2010-08-08)
This release adds forgotten nil assertions and updates the help manual.
.Bug fixes
* Forgot to add nil assertion methods in the `detest/long` library.
.Housekeeping
* Upgrade to Inochi 5.0.0; the help manual is now written in AsciiDoc.
=== Version 3.1.0 (2010-07-25)
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.
.New features
* Add `N()`, `N!()`, and `N?()` methods for asserting that a value is nil.
This idea comes from Gavin Sinclair's <<Attest>> assertion testing
library.
.Housekeeping
* Rename project from "DIFECTS" to "Detest".
* Upgrade project to Inochi 4.0.0 infrastructure.
* Minor code refactoring and manual revisions.
=== Version 3.0.1 (2010-07-25)
This release fixes a bug in Ruby 1.8, refactors the code, and better documents
test hooks in the manual.
.Bug fixes
* Ruby 1.8 does not pass value to `Hash#delete_if()`. All failure details
were being omitted, instead of just the unavailable ones, as a result.
.Housekeeping
* Refactor variable values hash calculation and pretty printing logic.
* Put FailureDetails pretty-printing modules into their own namespace.
* Raise error if closest insulated test cannot be not found.
* Describe all test hooks and add example to manual, plus small revisions.
=== Version 3.0.0 (2010-07-24)
This release renames the project from "Dfect" to "DIFECTS", reduces cruft,
improves the presentation and debuggability of assertion failures, and revises
the manual.
.Thank you
* Gavin Sinclair inspired me to work on this project again!
.Incompatible changes
* Rename project from "Dfect" to "DIFECTS", which stands for:
+
**D**escribe, **I**nform, **F**alse, **E**rror, **C**atch, **T**rue, **S**hare
* Remove <<ruby-debug>> 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.
* Remove `--quiet` option because user can pipe to /dev/null instead.
* Rename `run()` to `start()` to better complement `stop()`. The `run()`
method no longer clears test results; use `reset()` for that.
* Rename `L()` to `I()` as in "inform" the user.
* Replace `options()` with `debug()`.
* Replace `report()` with `trace()` and `stats()`.
* Rename the `difects/full` library to `difects/long`.
* Do not report instance variables in assertion failures.
.New features
* Improve debuggability by tracking the bindings of all lines of code
executed leading up to the point of failure using Ruby's awesome
`set_trace_func` facility.
+
This allows block-less assertions to be debugged with the same level of
accuracy as normal block-given assertions:
+
[source,ruby]
------------------------------------------------------------------------------
x = 1
y = 3
T { x == y } # a block-given assertion
T x == y # a block-less assertion
------------------------------------------------------------------------------
+
In both cases, you will be able to inspect the local variables x and y!
* Add `I!()` method to start the interactive debugger anywhere in your tests.
* Add `reset()` to manually clear previous test results.
* Alias `test()` to `D()` in <<Test::Unit>> emulation layer.
* Fallback to `pp()` if `to_yaml()` fails while reporting failures.
* Use <<OrderedHash>> library in Ruby versions older than 1.9 for
consistent presentation of information in assertion failures.
* Show full failure details before starting debugger instead of omitting
the backtrace and local variables listing.
* Use PP to pretty-print variable values in failure details.
* Omit unavailable information from failure details.
* Put backtrace above code listing and variables in failure details.
* Prevent empty array leaf nodes in execution trace.
.Bug fixes
* Make `DIFECTS` module's instance methods available as class methods.
* Always display fail trace before entering debugger.
* Always clear test execution internals after `start()`.
* Prevent IRB re-initialization errors when starting debugger.
.Housekeeping
* Clarify how to mix-in modules inside insulated tests in the manual.
Thanks to Gavin Sinclair for reporting this issue.
* Document methods (with hyperlinks to the location in the source code
where they are defined) provided by emulation layers in manual.
* Talk about passing condition as first argument to `T` and `F` assertions
and provide a code example in the manual.
* Clean up the code and revise the manual. Yay!
=== Version 2.2.0 (2010-04-28)
This release adds a UNIX manual page and a sub-library for full method names.
.New features
* Add `dfect/full` sub-library that provides full name aliases to Dfect's
abbreviated vocabulary:
+
**D**escribe, **T**rue, **F**alse, **E**rror, **C**atch, **S**hare, **L**og
* Run `dfect --help` to see the UNIX manual page!
.Housekeeping
* Upgrade to Inochi 3.0.0 and revise the help manual.
=== Version 2.1.0 (2010-03-31)
This release adds a command-line test runner and performs some minor
housekeeping.
.New features
* Add `bin/dfect` executable as command-line interface to this library.
.Housekeeping
* Do not `require 'rubygems'` before loading the "ruby-debug" library.
* Upgrade to Inochi 2.0.0-rc2 for managing this project.
=== Version 2.0.0 (2010-03-21)
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.
.Incompatible changes
* Root-level calls to the `Dfect::D()`
method are automatically insulated now.
* The `Dfect::E()` methods now expects its optional message
parameter to be the _last parameter_ in the parameter list.
* The `Dfect::C()` methods now expect their first parameter to
be a symbol instead of the optional message to be shown in
case of assertion failure.
* The `Dfect::R()` has been renamed to `Dfect::L()`,
which is a mnemonic for "Logging".
* Shorten names of hash keys in the execution trace for brevity
and rename `:raise` key in report statistics to `:error`.
* 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.
* The execution trace is only shown if all tests passed in `Dfect::run()`.
* The `:debug` option is now set to Ruby's `$DEBUG` global by default.
.New features
* Print failures as they occur instead of waiting until the end.
* 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.
+
This allows you to reduce "line noise" in your tests:
+
[source,ruby]
------------------------------------------------------------------------------
D "Lottery" do
winning_ticket = rand()
D "My chances of winning" do
my_ticket = rand()
F my_ticket == winning_ticket, "I won?! Dream on."
end
end
------------------------------------------------------------------------------
* Add `Dfect::S()` methods for sharing code between tests.
* Add `Dfect::D!()` method to explicitly insulate a test from other
tests, the top-level Ruby environment, and the code being tested.
* Add `Dfect::info()` method which returns the details of
the failure that is currently being debugged by the user.
* Add instance variables to the `:vars` section of a failure report.
* Add `setup!()` and `teardown!()` methods for before-all and
after-all hooks in the dfect/unit emulation library.
* Add test execution time to statistics hash (under the `:time` key).
.Bug fixes
* Do not print any output when `:quiet` option is active.
* Allow passing multiple strings/objects to `Dfect::D()` like in RSpec.
* Make before and after hook methods mixin-able like assertions.
* Do not assume that `Module#to_s` is the same as `Module#name`.
.Housekeeping
* Upgrade to Inochi 2.0.0-rc1 for managing this project.
* Make emulation libraries modify Dfect module instead of Kernel.
* Do not pollute the user's output with our `Class#to_yaml` workaround.
* Remove "Motivation" section from user manual. It was too fanatic!
=== Version 1.1.0 (2009-10-27)
This release adds a new method for emitting status messages and does some
internal housekeeping.
.Thank you
* Iñaki Baz Castillo used Dfect and suggested new features.
.New features
* Add `Dfect::S()` method for adding status messages to the execution report.
http://github.com/sunaku/dfect/issues/1[This feature was requested] by Iñaki
Baz Castillo.
.Housekeeping
* Remove unused require of `delegate` standard library in `dfect/spec`
RSpec emulation layer.
* Mention emulation layers for popular testing libraries.
* Mention that assertions take an optional message parameter.
* Replace sample unit test with Dfect test suite.
* Upgrade user manual to ERBook 9.0.0.
=== Version 1.0.1 (2009-10-07)
This release fixes a bug in the <<Test::Unit>> emulation library and revises
the user manual.
.Bug fixes
* The parameters for the `assert_equal()` method in the
dfect/unit library were in the wrong order.
.Housekeeping
* Revise user manual to better fit jQuery UI tabs.
* Justify the use of `eval()` in emulation libraries.
* Use simpler Copyright reminder at the top of every file.
* Make SLOC count in user manual reflect the _core_ library only.
* Mark code spans with `{:lang=ruby}` instead of HTML `<code/>` tags.
* Open source is for fun, so
http://loiclemeur.com/english/2009/03/never-criticize-your-competitors.html[be
nice] and speak of "related works" instead of "competitors".
=== Version 1.0.0 (2009-05-03)
This release improves default choices, adds emulation layers to mimic other
testing libraries, and fixes some bugs.
.Incompatible changes
* The `:debug` option is now enabled by default and is no longer linked to
the value of `$DEBUG`.
* `Dfect.run()` now appends to previous results by default. This behavior
can be disabled by passing `false` to the method.
.New features
* Add emulation layers to mimic other testing libraries:
+
[horizontal]
`dfect/unit` :: <<Test::Unit>> emulation layer
`dfect/mini` :: <<Minitest>> emulation layer
`dfect/spec` :: <<RSpec>> emulation layer
.Bug fixes
* Do not blindly replace `Class#to_yaml`; it might be fixed someday.
.Housekeeping
* Add "Motivation" section in user manual to promote interactive
debugging.
* Add brief History of this project's inception.
* Remove redundant assertions for F!() and T!() methods in test suite.
* Add copyright notice at the top of every file.
=== Version 0.1.0 (2009-04-28)
This release adds new variations to assertion methods, fixes several bugs,
and improves test coverage.
.Thank you
* François Beausoleil contributed patches for both code _and_ tests! :-)
.New features
* 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.
* Added documentation on how to insulate tests from the global Ruby
namespace.
.Bug fixes
* The `E()` method did not consider the case where a block does not raise
anything as a failure. Thanks to François Beausoleil for reporting this.
* When creating a report about an assertion failure, an exception would be
thrown if any local variables pointed to an empty array.
* The `Dfect::<()` method broke the inheritance-checking behavior of the <
class method. I added a bypass to the originial behavior so that `RCov::XX`
can properly generate a report about code that uses Dfect.
* Added workaround for YAML error that occurs when serializing a class object:
TypeError: can't dump anonymous class Class
.Housekeeping
* Filled the big holes in test coverage. Everything except the runtime
debugging logic is now covered by the unit tests.
=== Version 0.0.0 (2009-04-13)
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.
Why would _anyone_ think of using anything remotely different, let alone be
foolish enough to write an alternative testing library when these are clearly
"good enough"?
Recent experiments in assertion testing libraries smashed my world view:
* <<assert2>>
* <<Testy>>
* <<Verify>>
The status quo was certainly _not_ "good enough", as I had so blindly
believed all these years. In fact, they were _verbose_ behemoths that chose
to encode endless permutations of conjecture into methods.
Empowered by this revelation and inspired by
http://www.ruby-forum.com/topic/183354#801895[Sean O'Halpin's musing] on
alternative names for assertion methods, I rose to challenge the status quo.
And so I present to you the first public release of "Dfect".