test-unit 3.5.3 → 3.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -1
- data/Rakefile +11 -0
- data/doc/text/getting-started.md +1 -1
- data/doc/text/news.md +144 -104
- data/lib/test/unit/assertions.rb +141 -49
- data/lib/test/unit/attribute.rb +1 -0
- data/lib/test/unit/color-scheme.rb +10 -1
- data/lib/test/unit/ui/console/testrunner.rb +8 -5
- data/lib/test/unit/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59ba2bbe00e50cbe8fddafde4fcab620690213d5bca53fe5e154f42f5502cd6b
|
4
|
+
data.tar.gz: 5ec10a45c78af72d40b2d7439dafef5296b75fa46d89b9f1889338d2dc224829
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b638f460ef3ce8328bb51ed7e3cdf4a79bf36d864fd0ba37cbc4c5e4c43922e1847ee25c1cbb29dde6aa3f1cc38daabe760790f4c65300e4588037641dbe121f
|
7
|
+
data.tar.gz: 71827e75e9bb25f5569458d3b7fa5edb9cdf3f1693c4ac988b670a3c55cd64bade2f046c966ac76293d76d1e26422afce45bf1ccbf9346086498083e6ca915e2
|
data/README.md
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/test-unit.png)](http://badge.fury.io/rb/test-unit)
|
4
4
|
[![Build Status for Ruby 2.1+](https://github.com/test-unit/test-unit/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/test-unit/test-unit/actions/workflows/test.yml?query=branch%3Amaster+)
|
5
|
-
[![Build Status for Ruby 1.9 and 2.0](https://travis-ci.com/test-unit/test-unit.svg?branch=master)](https://travis-ci.com/test-unit/test-unit)
|
6
5
|
|
7
6
|
* http://test-unit.github.io/
|
8
7
|
* https://github.com/test-unit/test-unit
|
@@ -16,6 +15,17 @@ principles. These were originally designed by Kent Beck, creator of extreme
|
|
16
15
|
programming software development methodology, for Smalltalk's SUnit. It allows
|
17
16
|
writing tests, checking results and automated testing in Ruby.
|
18
17
|
|
18
|
+
test-unit ships as part of Ruby as a bundled gem. To check which version is included, see https://stdgems.org/test-unit/.
|
19
|
+
It's only necessary to install the gem if you need a newer version.
|
20
|
+
|
21
|
+
test-unit is the original Ruby unit testing library, and is still active.
|
22
|
+
It is one of two unit testing libraries bundled with Ruby, the other being [minitest](https://github.com/seattlerb/minitest).
|
23
|
+
|
24
|
+
When deciding which to use, consider:
|
25
|
+
|
26
|
+
* test-unit is strict about backwards compatibility. A backwards-incompatible change would be considered a bug.
|
27
|
+
* test-unit aims to support old Ruby versions, even if EOL.
|
28
|
+
|
19
29
|
## Features
|
20
30
|
|
21
31
|
* test-unit 1.2.3 is the original test-unit, taken
|
data/Rakefile
CHANGED
@@ -55,3 +55,14 @@ end
|
|
55
55
|
task :test do
|
56
56
|
ruby("test/run-test.rb")
|
57
57
|
end
|
58
|
+
|
59
|
+
namespace :doc do
|
60
|
+
task :add_permalink do
|
61
|
+
news_md = File.read("doc/text/news.md")
|
62
|
+
applied_permalink = news_md.gsub(/(?<pre>\[GitHub#(?<ref>\d+)\])(?!\()/) do
|
63
|
+
"#{Regexp.last_match[:pre]}(https://github.com/test-unit/test-unit/issues/#{Regexp.last_match[:ref]})"
|
64
|
+
end
|
65
|
+
|
66
|
+
File.write("doc/text/news.md", applied_permalink)
|
67
|
+
end
|
68
|
+
end
|
data/doc/text/getting-started.md
CHANGED
data/doc/text/news.md
CHANGED
@@ -1,11 +1,51 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 3.5.7 - 2022-12-15 {#version-3-5-7}
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* [UI][console]: Changed to use color escape sequence for each line
|
8
|
+
instead of each output that may consist with multiple lines.
|
9
|
+
|
10
|
+
## 3.5.6 - 2022-12-15 {#version-3-5-6}
|
11
|
+
|
12
|
+
### Improvements
|
13
|
+
|
14
|
+
* [UI][console]: Enabled 256 colors output on GitHub Actions by default.
|
15
|
+
|
16
|
+
## 3.5.5 - 2022-10-04 {#version-3-5-5}
|
17
|
+
|
18
|
+
### Fixes
|
19
|
+
|
20
|
+
* Suppressed a warning.
|
21
|
+
[GitHub#219](https://github.com/test-unit/test-unit/issues/219)[Patch by Kenichi Kamiya]
|
22
|
+
|
23
|
+
### Thanks
|
24
|
+
|
25
|
+
* Kenichi Kamiya
|
26
|
+
|
27
|
+
## 3.5.4 - 2022-10-04 {#version-3-5-4}
|
28
|
+
|
29
|
+
### Improvements
|
30
|
+
|
31
|
+
* Don't raise an error on `Test::Unit::TestCase.clone`.
|
32
|
+
[GitHub#210](https://github.com/test-unit/test-unit/issues/210)[Reported by David Marchaland]
|
33
|
+
|
34
|
+
* Added support for `BigDeciaml` in `assert_in_delta` family.
|
35
|
+
[GitHub#218](https://github.com/test-unit/test-unit/issues/218)[Patch by Kenta Murata]
|
36
|
+
|
37
|
+
### Thanks
|
38
|
+
|
39
|
+
* David Marchaland
|
40
|
+
|
41
|
+
* Kenta Murata
|
42
|
+
|
3
43
|
## 3.5.3 - 2021-12-20 {#version-3-5-3}
|
4
44
|
|
5
45
|
### Improvements
|
6
46
|
|
7
47
|
* Made how to sub test case generation customizable.
|
8
|
-
[GitHub#207][Patch by Akira Matsuda]
|
48
|
+
[GitHub#207](https://github.com/test-unit/test-unit/issues/207)[Patch by Akira Matsuda]
|
9
49
|
|
10
50
|
### Thanks
|
11
51
|
|
@@ -16,7 +56,7 @@
|
|
16
56
|
### Improvements
|
17
57
|
|
18
58
|
* Required `fileutils` lazy.
|
19
|
-
[GitHub#206][Patch by David Rodríguez]
|
59
|
+
[GitHub#206](https://github.com/test-unit/test-unit/issues/206)[Patch by David Rodríguez]
|
20
60
|
|
21
61
|
### Thanks
|
22
62
|
|
@@ -58,7 +98,7 @@
|
|
58
98
|
### Fixes
|
59
99
|
|
60
100
|
* Suppressed a warning on Ruby 2.
|
61
|
-
[GitHub#205][Patch by Kenichi Kamiya]
|
101
|
+
[GitHub#205](https://github.com/test-unit/test-unit/issues/205)[Patch by Kenichi Kamiya]
|
62
102
|
|
63
103
|
### Thanks
|
64
104
|
|
@@ -79,21 +119,21 @@
|
|
79
119
|
### Improvements
|
80
120
|
|
81
121
|
* Added more metadata to gemspec.
|
82
|
-
[GitHub#183][Patch by Kenichi Kamiya]
|
122
|
+
[GitHub#183](https://github.com/test-unit/test-unit/issues/183)[Patch by Kenichi Kamiya]
|
83
123
|
|
84
124
|
* Removed needless files from gem.
|
85
|
-
[GitHub#184][Patch by Kenichi Kamiya]
|
125
|
+
[GitHub#184](https://github.com/test-unit/test-unit/issues/184)[Patch by Kenichi Kamiya]
|
86
126
|
|
87
127
|
* Updated documents.
|
88
|
-
[GitHub#191][GitHub#192][GitHub#193][GitHub#199][GitHub#200]
|
89
|
-
[GitHub#201][Patch by Kenichi Kamiya]
|
128
|
+
[GitHub#191](https://github.com/test-unit/test-unit/issues/191)[GitHub#192](https://github.com/test-unit/test-unit/issues/192)[GitHub#193](https://github.com/test-unit/test-unit/issues/193)[GitHub#199](https://github.com/test-unit/test-unit/issues/199)[GitHub#200](https://github.com/test-unit/test-unit/issues/200)
|
129
|
+
[GitHub#201](https://github.com/test-unit/test-unit/issues/201)[Patch by Kenichi Kamiya]
|
90
130
|
|
91
131
|
* Added `assert_nothing_leaked_memory`.
|
92
132
|
|
93
133
|
### Fixes
|
94
134
|
|
95
135
|
* Fixed typos in documents.
|
96
|
-
[GitHub#189][GitHub#190][GitHub#195][GitHub#197][Patch by Kenichi Kamiya]
|
136
|
+
[GitHub#189](https://github.com/test-unit/test-unit/issues/189)[GitHub#190](https://github.com/test-unit/test-unit/issues/190)[GitHub#195](https://github.com/test-unit/test-unit/issues/195)[GitHub#197](https://github.com/test-unit/test-unit/issues/197)[Patch by Kenichi Kamiya]
|
97
137
|
|
98
138
|
### Thanks
|
99
139
|
|
@@ -130,7 +170,7 @@
|
|
130
170
|
* Fixed a bug that `setup`/`cleanup`/`teardown` with block may be
|
131
171
|
overwritten by another `setup`/`cleanup`/`teardown` with
|
132
172
|
block. It's caused only with Ruby 2.6 or earlier.
|
133
|
-
[GitHub#179][Reported by akira yamada]
|
173
|
+
[GitHub#179](https://github.com/test-unit/test-unit/issues/179)[Reported by akira yamada]
|
134
174
|
|
135
175
|
### Thanks
|
136
176
|
|
@@ -147,7 +187,7 @@
|
|
147
187
|
### Improvements
|
148
188
|
|
149
189
|
* `assert_not_match`: Add support for `String` as pattern.
|
150
|
-
[GitHub#178][Patch by David Rodríguez]
|
190
|
+
[GitHub#178](https://github.com/test-unit/test-unit/issues/178)[Patch by David Rodríguez]
|
151
191
|
|
152
192
|
### Thanks
|
153
193
|
|
@@ -165,23 +205,23 @@
|
|
165
205
|
### Improvements
|
166
206
|
|
167
207
|
* Improved TruffleRuby support.
|
168
|
-
[GitHub#171][Reported by Benoit Daloze]
|
208
|
+
[GitHub#171](https://github.com/test-unit/test-unit/issues/171)[Reported by Benoit Daloze]
|
169
209
|
|
170
210
|
* Removed needless `to_sym`.
|
171
|
-
[GitHub#177][Patch by icm7216]
|
211
|
+
[GitHub#177](https://github.com/test-unit/test-unit/issues/177)[Patch by icm7216]
|
172
212
|
|
173
213
|
* `assert_raise`: Added backtrace for actual error.
|
174
214
|
|
175
215
|
* Improved terminal color availability detection.
|
176
|
-
[GitHub#175][Patch by nicholas a. evans]
|
216
|
+
[GitHub#175](https://github.com/test-unit/test-unit/issues/175)[Patch by nicholas a. evans]
|
177
217
|
|
178
218
|
* Changed license to the new Ruby's.
|
179
|
-
[GitHub#174]
|
219
|
+
[GitHub#174](https://github.com/test-unit/test-unit/issues/174)
|
180
220
|
|
181
221
|
### Fixes
|
182
222
|
|
183
223
|
* Fixed a typo in `--help` output:
|
184
|
-
[GitHub#176][Patch by icm7216]
|
224
|
+
[GitHub#176](https://github.com/test-unit/test-unit/issues/176)[Patch by icm7216]
|
185
225
|
|
186
226
|
### Thanks
|
187
227
|
|
@@ -203,7 +243,7 @@
|
|
203
243
|
[Reported by Jun Aruga]
|
204
244
|
|
205
245
|
* Updated ruby-talk mailing list information
|
206
|
-
[GitHub#168][Patch by Chris Kampmeier]
|
246
|
+
[GitHub#168](https://github.com/test-unit/test-unit/issues/168)[Patch by Chris Kampmeier]
|
207
247
|
|
208
248
|
### Thanks
|
209
249
|
|
@@ -216,7 +256,7 @@
|
|
216
256
|
### Improvements
|
217
257
|
|
218
258
|
* Improved code snippet showing with different default external encoding.
|
219
|
-
[GitHub#166][Patch by Yuta Iwama]
|
259
|
+
[GitHub#166](https://github.com/test-unit/test-unit/issues/166)[Patch by Yuta Iwama]
|
220
260
|
|
221
261
|
### Thanks
|
222
262
|
|
@@ -227,10 +267,10 @@
|
|
227
267
|
### Improvements
|
228
268
|
|
229
269
|
* Converted markup format to Markdown from RDoc.
|
230
|
-
[GitHub#164][Patch by OGAWA KenIchi]
|
270
|
+
[GitHub#164](https://github.com/test-unit/test-unit/issues/164)[Patch by OGAWA KenIchi]
|
231
271
|
|
232
272
|
* test: Stopped to depend on `Time#inspect` format.
|
233
|
-
[GitHub#165][Reported by Benoit Daloze]
|
273
|
+
[GitHub#165](https://github.com/test-unit/test-unit/issues/165)[Reported by Benoit Daloze]
|
234
274
|
|
235
275
|
### Thanks
|
236
276
|
|
@@ -265,7 +305,7 @@
|
|
265
305
|
* Added support for `Test::Unit::AssertionFailedError#user_message`
|
266
306
|
for not only `assert_equal` and `assert_raise` but also all
|
267
307
|
assertions.
|
268
|
-
[GitHub#162][Reported by xgraffm]
|
308
|
+
[GitHub#162](https://github.com/test-unit/test-unit/issues/162)[Reported by xgraffm]
|
269
309
|
|
270
310
|
### Thanks
|
271
311
|
|
@@ -280,10 +320,10 @@
|
|
280
320
|
|
281
321
|
* Added support for defining methods to test case class in multiple
|
282
322
|
threads.
|
283
|
-
[GitHub#159][Reported by Charles Oliver Nutter]
|
323
|
+
[GitHub#159](https://github.com/test-unit/test-unit/issues/159)[Reported by Charles Oliver Nutter]
|
284
324
|
|
285
325
|
* Suppressed warnings on Ruby 2.5.
|
286
|
-
[GitHub#160][Reported by Daniel Berger]
|
326
|
+
[GitHub#160](https://github.com/test-unit/test-unit/issues/160)[Reported by Daniel Berger]
|
287
327
|
|
288
328
|
* Suppressed warnings on Ruby 2.7.
|
289
329
|
|
@@ -291,7 +331,7 @@
|
|
291
331
|
|
292
332
|
* Fixed a code snippet fetch failure when source code isn't UTF-8
|
293
333
|
and the default external encoding is set to not UTF-8.
|
294
|
-
[GitHub#161][Reported by masa kunikata]
|
334
|
+
[GitHub#161](https://github.com/test-unit/test-unit/issues/161)[Reported by masa kunikata]
|
295
335
|
|
296
336
|
### Thanks
|
297
337
|
|
@@ -384,10 +424,10 @@
|
|
384
424
|
### Improvements
|
385
425
|
|
386
426
|
* Added source code link to gemspec.
|
387
|
-
[GitHub#157][Patch by Grey Baker]
|
427
|
+
[GitHub#157](https://github.com/test-unit/test-unit/issues/157)[Patch by Grey Baker]
|
388
428
|
|
389
429
|
* Changed to use SVG image for badges in README.
|
390
|
-
[GitHub#158][Patch by Olle Jonsson]
|
430
|
+
[GitHub#158](https://github.com/test-unit/test-unit/issues/158)[Patch by Olle Jonsson]
|
391
431
|
|
392
432
|
* [UI][console]: Added `--reverse-output` option to output fault
|
393
433
|
details in reverse like Ruby 2.5. It's enabled by default only for
|
@@ -396,7 +436,7 @@
|
|
396
436
|
### Fixes
|
397
437
|
|
398
438
|
* Fixed a typo.
|
399
|
-
[GitHub#156][Patch by masa kunikata]
|
439
|
+
[GitHub#156](https://github.com/test-unit/test-unit/issues/156)[Patch by masa kunikata]
|
400
440
|
|
401
441
|
* [UI][console]: Fixed a bug that broken align in verbose mode.
|
402
442
|
|
@@ -413,7 +453,7 @@
|
|
413
453
|
### Improvements
|
414
454
|
|
415
455
|
* Changed test file require failure to error from omission.
|
416
|
-
[GitHub#154][Patch by naofumi-fujii]
|
456
|
+
[GitHub#154](https://github.com/test-unit/test-unit/issues/154)[Patch by naofumi-fujii]
|
417
457
|
|
418
458
|
### Thanks
|
419
459
|
|
@@ -424,7 +464,7 @@
|
|
424
464
|
### Improvements
|
425
465
|
|
426
466
|
* Supported `--enable-frozen-string-literal` `ruby` option.
|
427
|
-
[GitHub#149][Reported by Pat Allan]
|
467
|
+
[GitHub#149](https://github.com/test-unit/test-unit/issues/149)[Reported by Pat Allan]
|
428
468
|
|
429
469
|
### Thanks
|
430
470
|
|
@@ -436,39 +476,39 @@
|
|
436
476
|
|
437
477
|
* Updated tests for Ruby 2.4. [GitHUb#136][Patch by Kazuki Tsujimoto]
|
438
478
|
|
439
|
-
* Supported power\_assert 1.0.0. [GitHub#137][Patch by Kazuki Tsujimoto]
|
479
|
+
* Supported power\_assert 1.0.0. [GitHub#137](https://github.com/test-unit/test-unit/issues/137)[Patch by Kazuki Tsujimoto]
|
440
480
|
|
441
481
|
* Added the getting started document.
|
442
|
-
[GitHub#139][GitHub#141][Patch by Hiroyuki Sato]
|
482
|
+
[GitHub#139](https://github.com/test-unit/test-unit/issues/139)[GitHub#141](https://github.com/test-unit/test-unit/issues/141)[Patch by Hiroyuki Sato]
|
443
483
|
|
444
484
|
* Added the document for `attribute`.
|
445
|
-
[GitHub#143][Patch by Fumiaki MATSUSHIMA]
|
485
|
+
[GitHub#143](https://github.com/test-unit/test-unit/issues/143)[Patch by Fumiaki MATSUSHIMA]
|
446
486
|
|
447
|
-
* Improved a link for GitHub. [GitHub#144][Patch by rochefort]
|
487
|
+
* Improved a link for GitHub. [GitHub#144](https://github.com/test-unit/test-unit/issues/144)[Patch by rochefort]
|
448
488
|
|
449
|
-
* Updated `.travis.yml`. [GitHub#145][Patch by Jun Aruga]
|
489
|
+
* Updated `.travis.yml`. [GitHub#145](https://github.com/test-unit/test-unit/issues/145)[Patch by Jun Aruga]
|
450
490
|
|
451
491
|
### Fixes
|
452
492
|
|
453
|
-
* Fixed a contributor name. [GitHub#131][Patch by Akira Matsuda]
|
493
|
+
* Fixed a contributor name. [GitHub#131](https://github.com/test-unit/test-unit/issues/131)[Patch by Akira Matsuda]
|
454
494
|
|
455
|
-
* Fixed typos in document. [GitHub#132][Patch by Akira Matsuda]
|
495
|
+
* Fixed typos in document. [GitHub#132](https://github.com/test-unit/test-unit/issues/132)[Patch by Akira Matsuda]
|
456
496
|
|
457
|
-
* Fixed typos in document. [GitHub#134][Patch by Yuji Yaginuma]
|
497
|
+
* Fixed typos in document. [GitHub#134](https://github.com/test-unit/test-unit/issues/134)[Patch by Yuji Yaginuma]
|
458
498
|
|
459
499
|
* Fixed a bug that data label with "(" isn't supported.
|
460
|
-
[GitHub#135][Reported by Kazuki Tsujimoto]
|
500
|
+
[GitHub#135](https://github.com/test-unit/test-unit/issues/135)[Reported by Kazuki Tsujimoto]
|
461
501
|
|
462
502
|
* Fixed assertion message in English.
|
463
|
-
[GitHub#133][Reported by Khalil Fazal]
|
503
|
+
[GitHub#133](https://github.com/test-unit/test-unit/issues/133)[Reported by Khalil Fazal]
|
464
504
|
|
465
|
-
* Fixed a typo in typo fix. [GitHub#138][Patch by kami]
|
505
|
+
* Fixed a typo in typo fix. [GitHub#138](https://github.com/test-unit/test-unit/issues/138)[Patch by kami]
|
466
506
|
|
467
507
|
* Fixed a bug that target location finder may return wrong
|
468
|
-
location. [GitHub#146][Patch by Yuki Ito]
|
508
|
+
location. [GitHub#146](https://github.com/test-unit/test-unit/issues/146)[Patch by Yuki Ito]
|
469
509
|
|
470
510
|
* Fixed a bug that `--no-show-detail-immediately` raises an error.
|
471
|
-
[GitHub#147][Reported by MSP-Greg]
|
511
|
+
[GitHub#147](https://github.com/test-unit/test-unit/issues/147)[Reported by MSP-Greg]
|
472
512
|
|
473
513
|
### Thanks
|
474
514
|
|
@@ -499,7 +539,7 @@
|
|
499
539
|
### Fixes
|
500
540
|
|
501
541
|
* Fixed a bug that `--order` isn't applied.
|
502
|
-
[GitHub#129][Reported by Vít Ondruch]
|
542
|
+
[GitHub#129](https://github.com/test-unit/test-unit/issues/129)[Reported by Vít Ondruch]
|
503
543
|
|
504
544
|
### Thanks
|
505
545
|
|
@@ -510,14 +550,14 @@
|
|
510
550
|
### Improvements
|
511
551
|
|
512
552
|
* Improved Travis CI configuration.
|
513
|
-
[GitHub#123][Patch by Ryunosuke Sato]
|
553
|
+
[GitHub#123](https://github.com/test-unit/test-unit/issues/123)[Patch by Ryunosuke Sato]
|
514
554
|
|
515
555
|
* Supported Java native exception.
|
516
|
-
[GitHub#126][Reported by Bob Saveland]
|
556
|
+
[GitHub#126](https://github.com/test-unit/test-unit/issues/126)[Reported by Bob Saveland]
|
517
557
|
|
518
558
|
### Fixes
|
519
559
|
|
520
|
-
* doc: Fixed markup. [GitHub#127][Patch by Tomohiro Hashidate]
|
560
|
+
* doc: Fixed markup. [GitHub#127](https://github.com/test-unit/test-unit/issues/127)[Patch by Tomohiro Hashidate]
|
521
561
|
|
522
562
|
* Fixed a bug that `--location=LINE` may not detect a test when
|
523
563
|
fixtures are defined before any tests:
|
@@ -554,7 +594,7 @@
|
|
554
594
|
|
555
595
|
* Reported norification when data driven test doesn't have
|
556
596
|
parameter.
|
557
|
-
[GitHub#122][Reported by Satoshi "Moris" Tagomori]
|
597
|
+
[GitHub#122](https://github.com/test-unit/test-unit/issues/122)[Reported by Satoshi "Moris" Tagomori]
|
558
598
|
|
559
599
|
### Thanks
|
560
600
|
|
@@ -567,7 +607,7 @@
|
|
567
607
|
### Improvements
|
568
608
|
|
569
609
|
* Supported rxvt family terminals as color available terminals.
|
570
|
-
[GitHub#121][Reported by Ippei Kishida]
|
610
|
+
[GitHub#121](https://github.com/test-unit/test-unit/issues/121)[Reported by Ippei Kishida]
|
571
611
|
|
572
612
|
### Thanks
|
573
613
|
|
@@ -578,7 +618,7 @@
|
|
578
618
|
### Fixes
|
579
619
|
|
580
620
|
* Fixed conflict with test-unit-power_assert.
|
581
|
-
[GitHub#120][Patch by Kazuki Tsujimoto]
|
621
|
+
[GitHub#120](https://github.com/test-unit/test-unit/issues/120)[Patch by Kazuki Tsujimoto]
|
582
622
|
|
583
623
|
* Fixed a bug that path in `$LOAD_PATH` may be removed.
|
584
624
|
|
@@ -607,7 +647,7 @@ It's a Ruby on Rails integration improvement release.
|
|
607
647
|
### Improvements
|
608
648
|
|
609
649
|
* Filtered backtrace of power\_assert.
|
610
|
-
[GitHub#114]
|
650
|
+
[GitHub#114](https://github.com/test-unit/test-unit/issues/114)
|
611
651
|
* Improved performance to retrieve test defined location.
|
612
652
|
* Improved performance to run fixtures in a test.
|
613
653
|
* Supported running a test by `yield` in `setup`:
|
@@ -647,7 +687,7 @@ It's a Ruby on Rails integration improvement release.
|
|
647
687
|
|
648
688
|
* Fixed a bug that test isn't ran. The test has the same name as
|
649
689
|
data driven test that is defined in parent test case.
|
650
|
-
[GitHub#115]
|
690
|
+
[GitHub#115](https://github.com/test-unit/test-unit/issues/115)
|
651
691
|
|
652
692
|
## 3.1.5 - 2015-10-09 {#version-3-1-5}
|
653
693
|
|
@@ -657,7 +697,7 @@ It's a Rack integration improvement release.
|
|
657
697
|
|
658
698
|
* Renamed experimental top-level `run` method to `run_test` method
|
659
699
|
because `run` is conflicted with Rack.
|
660
|
-
[GitHub#32][GitHub:basecamp/pow#303] [Reported by Yevhen Viktorov]
|
700
|
+
[GitHub#32](https://github.com/test-unit/test-unit/issues/32)[GitHub:basecamp/pow#303] [Reported by Yevhen Viktorov]
|
661
701
|
|
662
702
|
### Thanks
|
663
703
|
|
@@ -669,14 +709,14 @@ It's a minor improvement release.
|
|
669
709
|
|
670
710
|
### Improvements
|
671
711
|
|
672
|
-
* Updated sample code. [GitHub#109][Patch by takiy33]
|
673
|
-
* Updated .travis.yml. [GitHub#110][Patch by takiy33]
|
712
|
+
* Updated sample code. [GitHub#109](https://github.com/test-unit/test-unit/issues/109)[Patch by takiy33]
|
713
|
+
* Updated .travis.yml. [GitHub#110](https://github.com/test-unit/test-unit/issues/110)[Patch by takiy33]
|
674
714
|
* document: Added table header in how to document.
|
675
|
-
[GitHub#111][Patch by takiy33]
|
715
|
+
[GitHub#111](https://github.com/test-unit/test-unit/issues/111)[Patch by takiy33]
|
676
716
|
* Removed duplicated code.
|
677
|
-
[GitHub#112][Patch by takiy33]
|
717
|
+
[GitHub#112](https://github.com/test-unit/test-unit/issues/112)[Patch by takiy33]
|
678
718
|
* Removed needless encoding conversion in fetching code snippet.
|
679
|
-
[GitHub#113][Patch by NARUSE, Yui]
|
719
|
+
[GitHub#113](https://github.com/test-unit/test-unit/issues/113)[Patch by NARUSE, Yui]
|
680
720
|
|
681
721
|
### Thanks
|
682
722
|
|
@@ -689,7 +729,7 @@ It's a bug fix release.
|
|
689
729
|
|
690
730
|
### Improvements
|
691
731
|
|
692
|
-
* Removed unused `TODO` file. [GitHub#108][Patch by takiy33]
|
732
|
+
* Removed unused `TODO` file. [GitHub#108](https://github.com/test-unit/test-unit/issues/108)[Patch by takiy33]
|
693
733
|
|
694
734
|
### Fixes
|
695
735
|
|
@@ -744,7 +784,7 @@ It's a bug fix release.
|
|
744
784
|
|
745
785
|
* Fixed a bug that `--location` detects tests not only in sub test
|
746
786
|
case but also parent test case.
|
747
|
-
[GitHub#105][Reported by wanabe]
|
787
|
+
[GitHub#105](https://github.com/test-unit/test-unit/issues/105)[Reported by wanabe]
|
748
788
|
|
749
789
|
### Thanks
|
750
790
|
|
@@ -761,18 +801,18 @@ It's a bug fix release.
|
|
761
801
|
### Fixes
|
762
802
|
|
763
803
|
* Fixed a bug that priority mode can't be used on Windows.
|
764
|
-
[GitHub#95][Reported by Daniel Berger]
|
804
|
+
[GitHub#95](https://github.com/test-unit/test-unit/issues/95)[Reported by Daniel Berger]
|
765
805
|
* Fixed a homepage URL RubyGems spec.
|
766
|
-
[GitHub#96][Patch by Masayoshi Takahashi]
|
767
|
-
supported.) [GitHub#89][Patch by Aaron Stone]
|
806
|
+
[GitHub#96](https://github.com/test-unit/test-unit/issues/96)[Patch by Masayoshi Takahashi]
|
807
|
+
supported.) [GitHub#89](https://github.com/test-unit/test-unit/issues/89)[Patch by Aaron Stone]
|
768
808
|
* Fixed a bug that shutdown hook isn't called when pass throw
|
769
809
|
exception such as `Interrupt` is raised.
|
770
|
-
[GitHub#98][Reported by jeremiahishere.]
|
810
|
+
[GitHub#98](https://github.com/test-unit/test-unit/issues/98)[Reported by jeremiahishere.]
|
771
811
|
* Fixed typos in documents.
|
772
|
-
[GitHub#100][Reported by scivola]
|
773
|
-
[GitHub#102][GitHub#103][Patch by Masafumi Yokoyama]
|
812
|
+
[GitHub#100](https://github.com/test-unit/test-unit/issues/100)[Reported by scivola]
|
813
|
+
[GitHub#102](https://github.com/test-unit/test-unit/issues/102)[GitHub#103](https://github.com/test-unit/test-unit/issues/103)[Patch by Masafumi Yokoyama]
|
774
814
|
* Fixed a bug that the same name test isn't executed in sub test case.
|
775
|
-
[GitHub#104][Reported by wanabe]
|
815
|
+
[GitHub#104](https://github.com/test-unit/test-unit/issues/104)[Reported by wanabe]
|
776
816
|
|
777
817
|
### Thanks
|
778
818
|
|
@@ -790,9 +830,9 @@ It's a release that improves colors.
|
|
790
830
|
### Improvements
|
791
831
|
|
792
832
|
* Added a work around for Ruby 1.8. (Note: Ruby 1.8 isn't
|
793
|
-
supported.) [GitHub#89][Patch by Aaron Stone]
|
833
|
+
supported.) [GitHub#89](https://github.com/test-unit/test-unit/issues/89)[Patch by Aaron Stone]
|
794
834
|
* Supported colorized output on Windows.
|
795
|
-
[GitHub#90][Patch by usa]
|
835
|
+
[GitHub#90](https://github.com/test-unit/test-unit/issues/90)[Patch by usa]
|
796
836
|
* Improved colorized output.
|
797
837
|
http://www.a-k-r.org/d/2014-12.html#a2014_12_27_1
|
798
838
|
[Suggested by Tanaka Akira]
|
@@ -812,7 +852,7 @@ It's a release that supports Ruby 2.2.0 preview2.
|
|
812
852
|
* Added a link for YARD in README.
|
813
853
|
[GitHub:test-unit.github.io#2][Reported by sunnyone]
|
814
854
|
* Added description about "/PATTERN/" style value in auto runner usage.
|
815
|
-
[GitHub#86][Suggested by sunnyone]
|
855
|
+
[GitHub#86](https://github.com/test-unit/test-unit/issues/86)[Suggested by sunnyone]
|
816
856
|
* Supported Ruby 2.2.0 preview2 in `assert_throw` and
|
817
857
|
`assert_nothing_thrown`.
|
818
858
|
|
@@ -820,7 +860,7 @@ It's a release that supports Ruby 2.2.0 preview2.
|
|
820
860
|
|
821
861
|
* Fixed a bug that error report is failed when source encoding and
|
822
862
|
locale encoding are different.
|
823
|
-
[GitHub#87][Reported by scivola]
|
863
|
+
[GitHub#87](https://github.com/test-unit/test-unit/issues/87)[Reported by scivola]
|
824
864
|
|
825
865
|
### Thanks
|
826
866
|
|
@@ -835,7 +875,7 @@ It's a minor update release.
|
|
835
875
|
|
836
876
|
* Fixed a bug that teardown blocks aren't called with sub class to
|
837
877
|
parent class order.
|
838
|
-
[GitHub#85][Reported by TOMITA Masahiro]
|
878
|
+
[GitHub#85](https://github.com/test-unit/test-unit/issues/85)[Reported by TOMITA Masahiro]
|
839
879
|
|
840
880
|
### Thanks
|
841
881
|
|
@@ -848,7 +888,7 @@ It's a minor update release.
|
|
848
888
|
### Improvements
|
849
889
|
|
850
890
|
* Improved code snippet location.
|
851
|
-
[GitHub#84][Patch by Yuki Kurihara]
|
891
|
+
[GitHub#84](https://github.com/test-unit/test-unit/issues/84)[Patch by Yuki Kurihara]
|
852
892
|
|
853
893
|
### Thanks
|
854
894
|
|
@@ -862,7 +902,7 @@ It's a minor update release.
|
|
862
902
|
|
863
903
|
* Fixed a bug that startup/shutdown of parent test case isn't called
|
864
904
|
when the test case includes one or more modules.
|
865
|
-
[GitHub#83][Reported by Chadderton Odwazny]
|
905
|
+
[GitHub#83](https://github.com/test-unit/test-unit/issues/83)[Reported by Chadderton Odwazny]
|
866
906
|
|
867
907
|
### Thanks
|
868
908
|
|
@@ -876,7 +916,7 @@ It's a minor update release.
|
|
876
916
|
|
877
917
|
* Stopped to remove JRuby and Rubinius internal backtrace entries from
|
878
918
|
backtrace on failure/error.
|
879
|
-
[GitHub#82][Patch by Charles Oliver Nutter]
|
919
|
+
[GitHub#82](https://github.com/test-unit/test-unit/issues/82)[Patch by Charles Oliver Nutter]
|
880
920
|
|
881
921
|
### Thanks
|
882
922
|
|
@@ -896,7 +936,7 @@ It's a minor update release.
|
|
896
936
|
### Fixes
|
897
937
|
|
898
938
|
* Fixed markup in document.
|
899
|
-
[GitHub#81][Patch by Masafumi Yokoyama]
|
939
|
+
[GitHub#81](https://github.com/test-unit/test-unit/issues/81)[Patch by Masafumi Yokoyama]
|
900
940
|
|
901
941
|
### Thanks
|
902
942
|
|
@@ -911,18 +951,18 @@ It's a minor update release.
|
|
911
951
|
|
912
952
|
* Supported broken `==` implementation.
|
913
953
|
`==` implementation should be fixed but it's not work of test-unit. :<
|
914
|
-
[GitHub#71][Reported by Emily]
|
954
|
+
[GitHub#71](https://github.com/test-unit/test-unit/issues/71)[Reported by Emily]
|
915
955
|
* [UI][console]: Accepted no message failure.
|
916
|
-
[GitHub#66][Reported by Brian Tatnall]
|
956
|
+
[GitHub#66](https://github.com/test-unit/test-unit/issues/66)[Reported by Brian Tatnall]
|
917
957
|
* Updated gem description.
|
918
|
-
[GitHub#74][Patch by Vít Ondruch]
|
958
|
+
[GitHub#74](https://github.com/test-unit/test-unit/issues/74)[Patch by Vít Ondruch]
|
919
959
|
* Updated GPL text.
|
920
|
-
[GitHub#78][Patch by Vít Ondruch]
|
960
|
+
[GitHub#78](https://github.com/test-unit/test-unit/issues/78)[Patch by Vít Ondruch]
|
921
961
|
|
922
962
|
### Fixes
|
923
963
|
|
924
964
|
* Removed needless executable bit from README file.
|
925
|
-
[GitHub#79][Patch by Vít Ondruch]
|
965
|
+
[GitHub#79](https://github.com/test-unit/test-unit/issues/79)[Patch by Vít Ondruch]
|
926
966
|
|
927
967
|
### Thanks
|
928
968
|
|
@@ -938,7 +978,7 @@ It's a minor update release.
|
|
938
978
|
|
939
979
|
* Improved Ruby 1.8.7 support. Note that we don't support Ruby 1.8.7
|
940
980
|
actively. We just support if its support is painless.
|
941
|
-
[GitHub#71][Patch by estolfo]
|
981
|
+
[GitHub#71](https://github.com/test-unit/test-unit/issues/71)[Patch by estolfo]
|
942
982
|
|
943
983
|
### Thanks
|
944
984
|
|
@@ -951,10 +991,10 @@ It's Power Assert supported release!
|
|
951
991
|
### Improvements
|
952
992
|
|
953
993
|
* Improved Rubinius support. [Ryo Onodera]
|
954
|
-
* Updated RR repository link. [GitHub#56][Patch by Kenichi Kamiya]
|
994
|
+
* Updated RR repository link. [GitHub#56](https://github.com/test-unit/test-unit/issues/56)[Patch by Kenichi Kamiya]
|
955
995
|
* Added some minitest compatible assertions. We don't recommend
|
956
996
|
using these assertions. They are just for migrating from minitest.
|
957
|
-
[GitHub#57][Patch by Karol Bucek]
|
997
|
+
[GitHub#57](https://github.com/test-unit/test-unit/issues/57)[Patch by Karol Bucek]
|
958
998
|
* {Test::Unit::Assertions#refute}
|
959
999
|
* {Test::Unit::Assertions#refute_predicate}
|
960
1000
|
* {Test::Unit::Assertions#refute_empty}
|
@@ -968,13 +1008,13 @@ It's Power Assert supported release!
|
|
968
1008
|
* {Test::Unit::Assertions#refute_operator}
|
969
1009
|
* Improved code readability. [Suggested by Kenichi Kamiya]
|
970
1010
|
* Made license field in RubyGems parseable.
|
971
|
-
[GitHub#60][Patch by Michael Grosser]
|
1011
|
+
[GitHub#60](https://github.com/test-unit/test-unit/issues/60)[Patch by Michael Grosser]
|
972
1012
|
* Improved test case match feature by `--testcase` and `--ignore-testcase`
|
973
1013
|
options. They also checks parent class names.
|
974
1014
|
* Made inspected representation of Numeric objects especially
|
975
|
-
BigDecimal more readable. [GitHub#64][Reported by Byron Appelt]
|
1015
|
+
BigDecimal more readable. [GitHub#64](https://github.com/test-unit/test-unit/issues/64)[Reported by Byron Appelt]
|
976
1016
|
* Added badges for Traivs CI and RubyGems.
|
977
|
-
[GitHub#65][Patch by Byron Appelt]
|
1017
|
+
[GitHub#65](https://github.com/test-unit/test-unit/issues/65)[Patch by Byron Appelt]
|
978
1018
|
* Supported Power Assert. You can use Power Assert with
|
979
1019
|
{Test::Unit::Assertions#assert} with block. See method document
|
980
1020
|
for details. We recommend using Power Assert for predicate method
|
@@ -988,10 +1028,10 @@ It's Power Assert supported release!
|
|
988
1028
|
### Fixes
|
989
1029
|
|
990
1030
|
* Fixed a bug that test case defined by block has wrong location.
|
991
|
-
[GitHub#58][Patch by Narihiro Nakamura]
|
1031
|
+
[GitHub#58](https://github.com/test-unit/test-unit/issues/58)[Patch by Narihiro Nakamura]
|
992
1032
|
* Fixed a bug that test methods defined in included modules in
|
993
1033
|
super-class are also collected.
|
994
|
-
[GitHub#62][GitHub#63][Patch by Karol Bucek]
|
1034
|
+
[GitHub#62](https://github.com/test-unit/test-unit/issues/62)[GitHub#63](https://github.com/test-unit/test-unit/issues/63)[Patch by Karol Bucek]
|
995
1035
|
|
996
1036
|
### Thanks
|
997
1037
|
|
@@ -1009,14 +1049,14 @@ It's Ruby 2.0.0 supported release!
|
|
1009
1049
|
|
1010
1050
|
### Improvements
|
1011
1051
|
|
1012
|
-
* Supported Ruby 2.0.0. [GitHub#54] [Reported by mtasaka]
|
1052
|
+
* Supported Ruby 2.0.0. [GitHub#54](https://github.com/test-unit/test-unit/issues/54) [Reported by mtasaka]
|
1013
1053
|
* Accepted screen-256color TERM as 256 colors available environment.
|
1014
|
-
[GitHub#55] [Reported by Tom Miller]
|
1054
|
+
[GitHub#55](https://github.com/test-unit/test-unit/issues/55) [Reported by Tom Miller]
|
1015
1055
|
|
1016
1056
|
### Fixes
|
1017
1057
|
|
1018
1058
|
* Fixed a typo in document.
|
1019
|
-
[GitHub#53] [Patch by Baptiste Fontaine]
|
1059
|
+
[GitHub#53](https://github.com/test-unit/test-unit/issues/53) [Patch by Baptiste Fontaine]
|
1020
1060
|
* Fixed a bug in {Test::Unit::Assertions#assert_in_epsilon}. It doesn't work
|
1021
1061
|
as expected if expected value is negative value.
|
1022
1062
|
[Ruby Bug #8317] [Reported by Nobuhiro IMAI]
|
@@ -1041,7 +1081,7 @@ It's a bug fix release.
|
|
1041
1081
|
### Fixes
|
1042
1082
|
|
1043
1083
|
* Fixed a bug. It is too slow to filter tests when there are many
|
1044
|
-
tests. [GitHub#46]
|
1084
|
+
tests. [GitHub#46](https://github.com/test-unit/test-unit/issues/46)
|
1045
1085
|
* Accept anonymous test suite.
|
1046
1086
|
[GitHub:#49] [Reported by Matthew Rudy Jacobs]
|
1047
1087
|
|
@@ -1059,21 +1099,21 @@ It's a release for minitest compatibility and bug fix.
|
|
1059
1099
|
* Added some assersion methods just for minitest compatibility.
|
1060
1100
|
Added methods are assert_includes(), refute_*() and refute().
|
1061
1101
|
If you are test-unit user, please don't use them.
|
1062
|
-
[GitHub#40] [Suggested by Michael Grosser]
|
1102
|
+
[GitHub#40](https://github.com/test-unit/test-unit/issues/40) [Suggested by Michael Grosser]
|
1063
1103
|
* Added --attribute option to select target tests by attribute.
|
1064
1104
|
[test-unit-users-en:00098] [Suggested by Piotr Nestorow]
|
1065
1105
|
|
1066
1106
|
### Fixes
|
1067
1107
|
|
1068
1108
|
* Allowed use of test for inheritance in ActionController::TestCase.
|
1069
|
-
[GitHub#42] [Patch by David Rasch]
|
1109
|
+
[GitHub#42](https://github.com/test-unit/test-unit/issues/42) [Patch by David Rasch]
|
1070
1110
|
* Ensured evaluating at_exit block in top level.
|
1071
1111
|
In IRB context, exit() specifies irb_exit().
|
1072
1112
|
[test-unit-users-en:00089] [Reported by Daniel Berger]
|
1073
1113
|
* Fixed a bug that decoration style description is ignored.
|
1074
1114
|
"decoration style description" are using description method
|
1075
1115
|
above "def test_name" or with Symbol specifying test_name.
|
1076
|
-
[GitHub#45] [Reported by Piotr Nestorow]
|
1116
|
+
[GitHub#45](https://github.com/test-unit/test-unit/issues/45) [Reported by Piotr Nestorow]
|
1077
1117
|
|
1078
1118
|
### Thanks
|
1079
1119
|
|
@@ -1091,10 +1131,10 @@ feature to `context` in shoulda-context and RSpec.
|
|
1091
1131
|
### Improvements
|
1092
1132
|
|
1093
1133
|
* Cleaned up tests.
|
1094
|
-
[GitHub#34] [Patch by Michael Grosser]
|
1134
|
+
[GitHub#34](https://github.com/test-unit/test-unit/issues/34) [Patch by Michael Grosser]
|
1095
1135
|
* Added missing background color for 8 color environment.
|
1096
1136
|
* Added workaround for NetBeans.
|
1097
|
-
[GitHub#38] [Reported by Marc Cooper]
|
1137
|
+
[GitHub#38](https://github.com/test-unit/test-unit/issues/38) [Reported by Marc Cooper]
|
1098
1138
|
* Added `--location` command line option that selects target tests
|
1099
1139
|
by test defined location.
|
1100
1140
|
* Created sub test suite for each subclassed test case.
|
@@ -1104,7 +1144,7 @@ feature to `context` in shoulda-context and RSpec.
|
|
1104
1144
|
[Good hook name is suggested by kdmsnr]
|
1105
1145
|
* Improved code snippet target on failure. Test method is always used
|
1106
1146
|
for code snippet target.
|
1107
|
-
[GitHub#39] [Suggested by Michael Grosser]
|
1147
|
+
[GitHub#39](https://github.com/test-unit/test-unit/issues/39) [Suggested by Michael Grosser]
|
1108
1148
|
* Added {Test::Unit::TestCase.sub_test_case} that creates sub test case.
|
1109
1149
|
The sub test case name isn't limited Ruby's constant name rule. You can
|
1110
1150
|
specify the sub test case name in free form.
|
@@ -1122,16 +1162,16 @@ It's a bug fix release.
|
|
1122
1162
|
### Improvements
|
1123
1163
|
|
1124
1164
|
* Supported installing from GitHub.
|
1125
|
-
[GitHub#29] [Suggested by Michael Grosser]
|
1165
|
+
[GitHub#29](https://github.com/test-unit/test-unit/issues/29) [Suggested by Michael Grosser]
|
1126
1166
|
* Supported ActiveSupport::TestCase.
|
1127
|
-
[GitHub#30] [Reported by Michael Grosser]
|
1167
|
+
[GitHub#30](https://github.com/test-unit/test-unit/issues/30) [Reported by Michael Grosser]
|
1128
1168
|
* [ui][console] Improved multiline falut message display.
|
1129
1169
|
|
1130
1170
|
### Fixes
|
1131
1171
|
|
1132
1172
|
* [ui][console] Fixed a bug that expected and actual values are
|
1133
1173
|
empty.
|
1134
|
-
[GitHub#31][GitHub#33]
|
1174
|
+
[GitHub#31](https://github.com/test-unit/test-unit/issues/31)[GitHub#33](https://github.com/test-unit/test-unit/issues/33)
|
1135
1175
|
[Reported by Kendall Buchanan][Reported by Mathieu Martin]
|
1136
1176
|
[Hinted by Michael Grosser]
|
1137
1177
|
* Fixed a bug that .gemspec can't be loaded on LANG=C.
|
@@ -1152,7 +1192,7 @@ It's a bug fix release.
|
|
1152
1192
|
|
1153
1193
|
* Fixed a backward incompatibility of `TestUnitMediator#run_suite`
|
1154
1194
|
introduced in 2.4.9.
|
1155
|
-
[GitHub#28] [Reported by Vladislav Rassokhin]
|
1195
|
+
[GitHub#28](https://github.com/test-unit/test-unit/issues/28) [Reported by Vladislav Rassokhin]
|
1156
1196
|
|
1157
1197
|
### Thanks
|
1158
1198
|
|
@@ -1173,7 +1213,7 @@ It's a bug fix release.
|
|
1173
1213
|
* Supported showing ASCII-8BIT diff in failure message.
|
1174
1214
|
* [ui][console] Supported `ENV["TERM"] == "xterm-256color"` as color
|
1175
1215
|
available terminal.
|
1176
|
-
[GitHub#26] [Reported by Michael Grosser]
|
1216
|
+
[GitHub#26](https://github.com/test-unit/test-unit/issues/26) [Reported by Michael Grosser]
|
1177
1217
|
* [ui][console] Supported "-256color" suffix `ENV["TERM"]` terminal
|
1178
1218
|
as 256 color supported terminal.
|
1179
1219
|
|
@@ -1184,7 +1224,7 @@ It's a bug fix release.
|
|
1184
1224
|
says.
|
1185
1225
|
[RubyForge#29554] [Reported by Bob Saveland]
|
1186
1226
|
* Added missing `require "test/unit/diff"`.
|
1187
|
-
[GitHub#25] [Reported by Stephan Kulow]
|
1227
|
+
[GitHub#25](https://github.com/test-unit/test-unit/issues/25) [Reported by Stephan Kulow]
|
1188
1228
|
|
1189
1229
|
### Thanks
|
1190
1230
|
|
@@ -1550,7 +1590,7 @@ Output improvement release!
|
|
1550
1590
|
* use ~/.test-unit.yml as global configuration file.
|
1551
1591
|
* add TAP runner. (--runner tap)
|
1552
1592
|
* support colorized diff:
|
1553
|
-
|
1593
|
+
https://test-unit.github.io/color-diff.png
|
1554
1594
|
* add Test::Unit::AutoRunner.default_runner= to specify default test runner.
|
1555
1595
|
|
1556
1596
|
* 4 minor enhancements
|
data/lib/test/unit/assertions.rb
CHANGED
@@ -926,15 +926,37 @@ EOT
|
|
926
926
|
# assert_in_delta 0.05, (50000.0 / 10**6), 0.00001
|
927
927
|
def assert_in_delta(expected_float, actual_float, delta=0.001, message="")
|
928
928
|
_wrap_assertion do
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
929
|
+
begin
|
930
|
+
pass = delta >= (expected_float - actual_float).abs
|
931
|
+
assert_operator(delta, :>=, 0.0, "The delta should not be negative")
|
932
|
+
full_message = _assert_in_delta_message(expected_float,
|
933
|
+
expected_float,
|
934
|
+
actual_float,
|
935
|
+
actual_float,
|
936
|
+
delta,
|
937
|
+
delta,
|
938
|
+
message)
|
939
|
+
rescue Test::Unit::AssertionFailedError
|
940
|
+
# for the above assert_operator
|
941
|
+
raise
|
942
|
+
rescue
|
943
|
+
_assert_in_delta_validate_arguments(expected_float,
|
944
|
+
actual_float,
|
945
|
+
delta)
|
946
|
+
normalized_expected = expected_float.to_f
|
947
|
+
normalized_actual = actual_float.to_f
|
948
|
+
normalized_delta = delta.to_f
|
949
|
+
pass = (normalized_expected - normalized_actual).abs <= normalized_delta
|
950
|
+
full_message = _assert_in_delta_message(expected_float,
|
951
|
+
normalized_expected,
|
952
|
+
actual_float,
|
953
|
+
normalized_actual,
|
954
|
+
delta,
|
955
|
+
normalized_delta,
|
956
|
+
message)
|
957
|
+
end
|
936
958
|
assert_block(full_message) do
|
937
|
-
|
959
|
+
pass
|
938
960
|
end
|
939
961
|
end
|
940
962
|
end
|
@@ -951,13 +973,32 @@ EOT
|
|
951
973
|
_assert_in_delta_validate_arguments(expected_float,
|
952
974
|
actual_float,
|
953
975
|
delta)
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
976
|
+
begin
|
977
|
+
pass = (expected_float - actual_float).abs > delta
|
978
|
+
full_message = _assert_in_delta_message(expected_float,
|
979
|
+
expected_float,
|
980
|
+
actual_float,
|
981
|
+
actual_float,
|
982
|
+
delta,
|
983
|
+
delta,
|
984
|
+
message,
|
985
|
+
:negative_assertion => true)
|
986
|
+
rescue
|
987
|
+
normalized_expected = expected_float.to_f
|
988
|
+
normalized_actual = actual_float.to_f
|
989
|
+
normalized_delta = delta.to_f
|
990
|
+
pass = (normalized_expected - normalized_actual).abs > normalized_delta
|
991
|
+
full_message = _assert_in_delta_message(expected_float,
|
992
|
+
normalized_expected,
|
993
|
+
actual_float,
|
994
|
+
normalized_actual,
|
995
|
+
delta,
|
996
|
+
normalized_delta,
|
997
|
+
message,
|
998
|
+
:negative_assertion => true)
|
999
|
+
end
|
959
1000
|
assert_block(full_message) do
|
960
|
-
|
1001
|
+
pass
|
961
1002
|
end
|
962
1003
|
end
|
963
1004
|
end
|
@@ -984,7 +1025,9 @@ EOT
|
|
984
1025
|
assert_operator(delta, :>=, 0.0, "The delta should not be negative")
|
985
1026
|
end
|
986
1027
|
|
987
|
-
def _assert_in_delta_message(expected_float,
|
1028
|
+
def _assert_in_delta_message(expected_float, normalized_expected,
|
1029
|
+
actual_float, normalized_actual,
|
1030
|
+
delta, normalized_delta,
|
988
1031
|
message, options={})
|
989
1032
|
if options[:negative_assertion]
|
990
1033
|
format = <<-EOT
|
@@ -998,9 +1041,6 @@ EOT
|
|
998
1041
|
EOT
|
999
1042
|
end
|
1000
1043
|
arguments = [expected_float, delta, actual_float]
|
1001
|
-
normalized_expected = expected_float.to_f
|
1002
|
-
normalized_actual = actual_float.to_f
|
1003
|
-
normalized_delta = delta.to_f
|
1004
1044
|
relation_format = nil
|
1005
1045
|
relation_arguments = nil
|
1006
1046
|
if normalized_actual < normalized_expected - normalized_delta
|
@@ -1049,22 +1089,52 @@ EOT
|
|
1049
1089
|
def assert_in_epsilon(expected_float, actual_float, epsilon=0.001,
|
1050
1090
|
message="")
|
1051
1091
|
_wrap_assertion do
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
actual_float,
|
1057
|
-
epsilon,
|
1058
|
-
message)
|
1059
|
-
assert_block(full_message) do
|
1060
|
-
normalized_expected_float = expected_float.to_f
|
1061
|
-
if normalized_expected_float.zero?
|
1062
|
-
delta = epsilon.to_f ** 2
|
1092
|
+
begin
|
1093
|
+
zero_p = expected_float.zero? rescue expected_float == 0
|
1094
|
+
if zero_p
|
1095
|
+
delta = epsilon ** 2
|
1063
1096
|
else
|
1064
|
-
delta =
|
1097
|
+
delta = expected_float * epsilon
|
1065
1098
|
end
|
1066
1099
|
delta = delta.abs
|
1067
|
-
(
|
1100
|
+
pass = (expected_float - actual_float).abs <= delta
|
1101
|
+
assert_operator(epsilon, :>=, 0.0, "The epsilon should not be negative")
|
1102
|
+
full_message = _assert_in_epsilon_message(expected_float,
|
1103
|
+
expected_float,
|
1104
|
+
actual_float,
|
1105
|
+
actual_float,
|
1106
|
+
epsilon,
|
1107
|
+
epsilon,
|
1108
|
+
delta,
|
1109
|
+
message)
|
1110
|
+
rescue Test::Unit::AssertionFailedError
|
1111
|
+
# for the above assert_operator
|
1112
|
+
raise
|
1113
|
+
rescue
|
1114
|
+
_assert_in_epsilon_validate_arguments(expected_float,
|
1115
|
+
actual_float,
|
1116
|
+
epsilon)
|
1117
|
+
normalized_expected = expected_float.to_f
|
1118
|
+
normalized_actual = actual_float.to_f
|
1119
|
+
normalized_epsilon = epsilon.to_f
|
1120
|
+
if normalized_expected.zero?
|
1121
|
+
delta = normalized_epsilon ** 2
|
1122
|
+
else
|
1123
|
+
delta = normalized_expected * normalized_epsilon
|
1124
|
+
end
|
1125
|
+
delta = delta.abs
|
1126
|
+
full_message = _assert_in_epsilon_message(expected_float,
|
1127
|
+
normalized_expected,
|
1128
|
+
actual_float,
|
1129
|
+
normalized_actual,
|
1130
|
+
epsilon,
|
1131
|
+
normalized_epsilon,
|
1132
|
+
delta,
|
1133
|
+
message)
|
1134
|
+
pass = (normalized_expected - normalized_actual).abs <= delta
|
1135
|
+
end
|
1136
|
+
assert_block(full_message) do
|
1137
|
+
pass
|
1068
1138
|
end
|
1069
1139
|
end
|
1070
1140
|
end
|
@@ -1080,18 +1150,43 @@ EOT
|
|
1080
1150
|
def assert_not_in_epsilon(expected_float, actual_float, epsilon=0.001,
|
1081
1151
|
message="")
|
1082
1152
|
_wrap_assertion do
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1153
|
+
begin
|
1154
|
+
delta = expected_float * epsilon
|
1155
|
+
pass = (expected_float - actual_float).abs > delta
|
1156
|
+
assert_operator(epsilon, :>=, 0.0, "The epsilon should not be negative")
|
1157
|
+
full_message = _assert_in_epsilon_message(expected_float,
|
1158
|
+
expected_float,
|
1159
|
+
actual_float,
|
1160
|
+
actual_float,
|
1161
|
+
epsilon,
|
1162
|
+
epsilon,
|
1163
|
+
delta,
|
1164
|
+
message,
|
1165
|
+
:negative_assertion => true)
|
1166
|
+
rescue Test::Unit::AssertionFailedError
|
1167
|
+
# for the above assert_operator
|
1168
|
+
raise
|
1169
|
+
rescue
|
1170
|
+
_assert_in_epsilon_validate_arguments(expected_float,
|
1171
|
+
actual_float,
|
1172
|
+
epsilon)
|
1173
|
+
normalized_expected = expected_float.to_f
|
1174
|
+
normalized_actual = actual_float.to_f
|
1175
|
+
normalized_epsilon = epsilon.to_f
|
1176
|
+
delta = normalized_expected * normalized_epsilon
|
1177
|
+
pass = (normalized_expected - normalized_actual).abs > delta
|
1178
|
+
full_message = _assert_in_epsilon_message(expected_float,
|
1179
|
+
normalized_expected,
|
1180
|
+
actual_float,
|
1181
|
+
normalized_actual,
|
1182
|
+
epsilon,
|
1183
|
+
normalized_epsilon,
|
1184
|
+
delta,
|
1185
|
+
message,
|
1186
|
+
:negative_assertion => true)
|
1187
|
+
end
|
1091
1188
|
assert_block(full_message) do
|
1092
|
-
|
1093
|
-
delta = normalized_expected_float * epsilon.to_f
|
1094
|
-
(normalized_expected_float - actual_float.to_f).abs > delta
|
1189
|
+
pass
|
1095
1190
|
end
|
1096
1191
|
end
|
1097
1192
|
end
|
@@ -1118,13 +1213,10 @@ EOT
|
|
1118
1213
|
assert_operator(epsilon, :>=, 0.0, "The epsilon should not be negative")
|
1119
1214
|
end
|
1120
1215
|
|
1121
|
-
def _assert_in_epsilon_message(expected_float,
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
normalized_epsilon = epsilon.to_f
|
1126
|
-
delta = normalized_expected * normalized_epsilon
|
1127
|
-
|
1216
|
+
def _assert_in_epsilon_message(expected_float, normalized_expected,
|
1217
|
+
actual_float, normalized_actual,
|
1218
|
+
epsilon, normalized_epsilon,
|
1219
|
+
delta, message, options={})
|
1128
1220
|
if options[:negative_assertion]
|
1129
1221
|
format = <<-EOT
|
1130
1222
|
<?> -/+ (<?> * <?>)[?] was expected to not include
|
data/lib/test/unit/attribute.rb
CHANGED
@@ -126,6 +126,7 @@ module Test
|
|
126
126
|
guess_available_colors_from_vte_version_env ||
|
127
127
|
guess_available_colors_from_colorterm_env ||
|
128
128
|
guess_available_colors_from_term_env ||
|
129
|
+
guess_available_colors_from_github_actions_env ||
|
129
130
|
8
|
130
131
|
end
|
131
132
|
|
@@ -157,13 +158,21 @@ module Test
|
|
157
158
|
def guess_available_colors_from_term_env
|
158
159
|
case ENV["TERM"]
|
159
160
|
when /[+-]direct/
|
160
|
-
2**24
|
161
|
+
2 ** 24
|
161
162
|
when TERM_256
|
162
163
|
256
|
163
164
|
else
|
164
165
|
nil
|
165
166
|
end
|
166
167
|
end
|
168
|
+
|
169
|
+
def guess_available_colors_from_github_actions_env
|
170
|
+
if ENV["GITHUB_ACTIONS"] == "true"
|
171
|
+
2 ** 24
|
172
|
+
else
|
173
|
+
nil
|
174
|
+
end
|
175
|
+
end
|
167
176
|
end
|
168
177
|
|
169
178
|
def initialize(scheme_spec)
|
@@ -435,12 +435,14 @@ module Test
|
|
435
435
|
|
436
436
|
def output_single(something, color=nil, level=nil)
|
437
437
|
return false unless output?(level)
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
438
|
+
something.to_s.each_line do |line|
|
439
|
+
if @use_color and color
|
440
|
+
line = "%s%s%s" % [color.escape_sequence,
|
441
|
+
line,
|
442
|
+
@reset_color.escape_sequence]
|
443
|
+
end
|
444
|
+
@output.write(line)
|
442
445
|
end
|
443
|
-
@output.write(something)
|
444
446
|
@output.flush
|
445
447
|
true
|
446
448
|
end
|
@@ -524,6 +526,7 @@ module Test
|
|
524
526
|
/x
|
525
527
|
|
526
528
|
def guess_color_availability
|
529
|
+
return true if ENV["GITHUB_ACTIONS"] == "true"
|
527
530
|
return false unless @output.tty?
|
528
531
|
return true if windows? and ruby_2_0_or_later?
|
529
532
|
case ENV["TERM"]
|
data/lib/test/unit/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-unit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
- Haruka Yoshihara
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-12-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: power_assert
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
|
-
description:
|
98
|
+
description: |-
|
99
99
|
test-unit (Test::Unit) is unit testing framework for Ruby, based on xUnit
|
100
100
|
principles. These were originally designed by Kent Beck, creator of extreme
|
101
101
|
programming software development methodology, for Smalltalk's SUnit. It allows
|
@@ -180,7 +180,7 @@ metadata:
|
|
180
180
|
source_code_uri: https://github.com/test-unit/test-unit
|
181
181
|
documentation_uri: https://test-unit.github.io/test-unit/en/
|
182
182
|
bug_tracker_uri: https://github.com/test-unit/test-unit/issues
|
183
|
-
post_install_message:
|
183
|
+
post_install_message:
|
184
184
|
rdoc_options: []
|
185
185
|
require_paths:
|
186
186
|
- lib
|
@@ -195,8 +195,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
199
|
-
signing_key:
|
198
|
+
rubygems_version: 3.4.0.dev
|
199
|
+
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: An xUnit family unit testing framework for Ruby.
|
202
202
|
test_files: []
|