test-unit 3.5.2 → 3.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +11 -0
- data/lib/test/unit/testcase.rb +12 -7
- data/lib/test/unit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a763b935a0a7386519019ce4dc198a3ba9f0dd00f9f44a10cb887d48f2b9d2e
|
4
|
+
data.tar.gz: a7b94931289833bc8406c5b07421425110a37ff9a099c43257a83e9b3759a7f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4cda5342ca0dee7d082e7a61c41a16e532a270848c5944cad33b04fac1cc4b4eaafc3952fba1e8035f2a2f23dd0ef71adf01262210c8f4df860ef155e92cefd
|
7
|
+
data.tar.gz: a28acd0a86eaab701fc1bcc4682e17d1ddd2298fa34e2e292fffe488995f257b728fb0aaedb9d9e0511316dd411b9d44a09d59084c91997e190fef55a2b3ce14
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 3.5.3 - 2021-12-20 {#version-3-5-3}
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* Made how to sub test case generation customizable.
|
8
|
+
[GitHub#207][Patch by Akira Matsuda]
|
9
|
+
|
10
|
+
### Thanks
|
11
|
+
|
12
|
+
* Akira Matsuda
|
13
|
+
|
3
14
|
## 3.5.2 - 2021-12-10 {#version-3-5-2}
|
4
15
|
|
5
16
|
### Improvements
|
data/lib/test/unit/testcase.rb
CHANGED
@@ -419,13 +419,7 @@ module Test
|
|
419
419
|
# case class context.
|
420
420
|
# @return [Test::Unit::TestCase] Created sub test case class.
|
421
421
|
def sub_test_case(name, &block)
|
422
|
-
|
423
|
-
sub_test_case = Class.new(self) do
|
424
|
-
singleton_class = class << self; self; end
|
425
|
-
singleton_class.__send__(:define_method, :name) do
|
426
|
-
[parent_test_case.name, name].compact.join("::")
|
427
|
-
end
|
428
|
-
end
|
422
|
+
sub_test_case = sub_test_case_class(name)
|
429
423
|
sub_test_case.class_eval(&block)
|
430
424
|
sub_test_case
|
431
425
|
end
|
@@ -514,6 +508,17 @@ module Test
|
|
514
508
|
target_locations
|
515
509
|
end
|
516
510
|
end
|
511
|
+
|
512
|
+
# @private
|
513
|
+
def sub_test_case_class(name)
|
514
|
+
parent_test_case = self
|
515
|
+
Class.new(self) do
|
516
|
+
singleton_class = class << self; self; end
|
517
|
+
singleton_class.__send__(:define_method, :name) do
|
518
|
+
[parent_test_case.name, name].compact.join("::")
|
519
|
+
end
|
520
|
+
end
|
521
|
+
end
|
517
522
|
end
|
518
523
|
|
519
524
|
attr_reader :method_name
|
data/lib/test/unit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-12-
|
12
|
+
date: 2021-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: power_assert
|