test-unit 3.3.1 → 3.3.2
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 +13 -0
- data/lib/test/unit/collector/load.rb +1 -3
- data/lib/test/unit/version.rb +1 -1
- data/test/collector/test-load.rb +35 -2
- metadata +35 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b605100d1823a7003414a1197ac8b6412a2711439591fb1772fbdbe66bda324
|
4
|
+
data.tar.gz: 799422c8a9fa294365e3a6b6b2b7fa7e5352882bd10df2b877ed751f1383ff69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a91dd90de4e2e044234710e53d175be3db38af3497b2e04c84b9876b06a95f14f0636bfd68b20905d964969aeac0a92bb22a91f86a5413d18e8e636473778573
|
7
|
+
data.tar.gz: eb2ae248c0be1740915e9f31631a8c7d3e2d5e3dbf1d93b92bb55880bb7038eacf4351d0120e9e78f7c893fbef14035835cbad703f00e237eaa41346f2f9e0ee
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 3.3.2 - 2019-04-11 {#version-3-3-2}
|
4
|
+
|
5
|
+
### Fixes
|
6
|
+
|
7
|
+
* Fixed a bug that `Test::Unit::Collector::Load` doesn't load test
|
8
|
+
files under sub directories when these files have the same base
|
9
|
+
name as test files in upper directories.
|
10
|
+
[Reported by Kenta Murata]
|
11
|
+
|
12
|
+
### Thanks
|
13
|
+
|
14
|
+
* Kenta Murata
|
15
|
+
|
3
16
|
## 3.3.1 - 2019-03-27 {#version-3-3-1}
|
4
17
|
|
5
18
|
### Improvements
|
@@ -111,7 +111,7 @@ module Test
|
|
111
111
|
return if @program_file == expanded_path.to_s
|
112
112
|
add_load_path(expanded_path.dirname) do
|
113
113
|
begin
|
114
|
-
require(
|
114
|
+
require(expanded_path.to_s)
|
115
115
|
rescue LoadError
|
116
116
|
@require_failed_infos << {:path => expanded_path, :exception => $!}
|
117
117
|
end
|
@@ -131,8 +131,6 @@ module Test
|
|
131
131
|
return yield if path.nil?
|
132
132
|
|
133
133
|
path = path.to_s
|
134
|
-
return yield if $LOAD_PATH.index(path)
|
135
|
-
|
136
134
|
begin
|
137
135
|
$LOAD_PATH.unshift(path)
|
138
136
|
yield
|
data/lib/test/unit/version.rb
CHANGED
data/test/collector/test-load.rb
CHANGED
@@ -20,7 +20,9 @@ class TestUnitCollectorLoad < Test::Unit::TestCase
|
|
20
20
|
|
21
21
|
setup
|
22
22
|
def setup_top_level_test_cases
|
23
|
-
@
|
23
|
+
@test_case1_base_name = "test_case1.rb"
|
24
|
+
|
25
|
+
@test_case1 = @test_dir + @test_case1_base_name
|
24
26
|
@test_case2 = @test_dir + "test_case2.rb"
|
25
27
|
@no_load_test_case3 = @test_dir + "case3.rb"
|
26
28
|
|
@@ -66,10 +68,25 @@ EOT
|
|
66
68
|
@sub_test_dir = @test_dir + "sub"
|
67
69
|
@sub_test_dir.mkpath
|
68
70
|
|
71
|
+
@sub_test_case1 = @sub_test_dir + @test_case1_base_name
|
69
72
|
@sub_test_case4 = @sub_test_dir + "test_case4.rb"
|
70
73
|
@no_load_sub_test_case5 = @sub_test_dir + "case5.rb"
|
71
74
|
@sub_test_case6 = @sub_test_dir + "test_case6.rb"
|
72
75
|
|
76
|
+
@sub_test_case1.open("w") do |test_case|
|
77
|
+
test_case.puts(<<-TEST_CASE)
|
78
|
+
module #{@temporary_test_cases_module_name}
|
79
|
+
class SubTestCase1 < Test::Unit::TestCase
|
80
|
+
def test1_1
|
81
|
+
end
|
82
|
+
|
83
|
+
def test1_2
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
TEST_CASE
|
88
|
+
end
|
89
|
+
|
73
90
|
@sub_test_case4.open("w") do |test_case|
|
74
91
|
test_case.puts(<<-EOT)
|
75
92
|
module #{@temporary_test_cases_module_name}
|
@@ -271,6 +288,9 @@ EOT
|
|
271
288
|
|
272
289
|
def test_simple_collect
|
273
290
|
assert_collect([:suite, {:name => @sub_test_dir.basename.to_s},
|
291
|
+
[:suite, {:name => _test_case_name("SubTestCase1")},
|
292
|
+
[:test, {:name => "test1_1"}],
|
293
|
+
[:test, {:name => "test1_2"}]],
|
274
294
|
[:suite, {:name => _test_case_name("SubTestCase4")},
|
275
295
|
[:test, {:name => "test4_1"}],
|
276
296
|
[:test, {:name => "test4_2"}]],
|
@@ -302,6 +322,9 @@ EOT
|
|
302
322
|
[:suite, {:name => _test_case_name("TestCase2")},
|
303
323
|
[:test, {:name => "test2"}]],
|
304
324
|
[:suite, {:name => @sub_test_dir.basename.to_s},
|
325
|
+
[:suite, {:name => _test_case_name("SubTestCase1")},
|
326
|
+
[:test, {:name => "test1_1"}],
|
327
|
+
[:test, {:name => "test1_2"}]],
|
305
328
|
[:suite, {:name => _test_case_name("SubTestCase4")},
|
306
329
|
[:test, {:name => "test4_1"}],
|
307
330
|
[:test, {:name => "test4_2"}]],
|
@@ -356,6 +379,9 @@ EOT
|
|
356
379
|
[:suite, {:name => _test_case_name("NoLoadSubTestCase5")},
|
357
380
|
[:test, {:name => "test5_1"}],
|
358
381
|
[:test, {:name => "test5_2"}]],
|
382
|
+
[:suite, {:name => _test_case_name("SubTestCase1")},
|
383
|
+
[:test, {:name => "test1_1"}],
|
384
|
+
[:test, {:name => "test1_2"}]],
|
359
385
|
[:suite, {:name => _test_case_name("SubTestCase4")},
|
360
386
|
[:test, {:name => "test4_1"}],
|
361
387
|
[:test, {:name => "test4_2"}]],
|
@@ -370,7 +396,11 @@ EOT
|
|
370
396
|
assert_collect([:suite, {:name => "."},
|
371
397
|
[:suite, {:name => _test_case_name("TestCase1")},
|
372
398
|
[:test, {:name => "test1_1"}],
|
373
|
-
[:test, {:name => "test1_2"}]]
|
399
|
+
[:test, {:name => "test1_2"}]],
|
400
|
+
[:suite, {:name => @sub_test_dir.basename.to_s},
|
401
|
+
[:suite, {:name => _test_case_name("SubTestCase1")},
|
402
|
+
[:test, {:name => "test1_1"}],
|
403
|
+
[:test, {:name => "test1_2"}]]]]) do |collector|
|
374
404
|
collector.filter = Proc.new do |test|
|
375
405
|
!/\Atest1/.match(test.method_name).nil?
|
376
406
|
end
|
@@ -381,6 +411,9 @@ EOT
|
|
381
411
|
test_dirs = [@sub_test_dir.to_s, @sub2_test_dir.to_s]
|
382
412
|
assert_collect([:suite, {:name => "[#{test_dirs.join(', ')}]"},
|
383
413
|
[:suite, {:name => @sub_test_dir.basename.to_s},
|
414
|
+
[:suite, {:name => _test_case_name("SubTestCase1")},
|
415
|
+
[:test, {:name => "test1_1"}],
|
416
|
+
[:test, {:name => "test1_2"}]],
|
384
417
|
[:suite, {:name => _test_case_name("SubTestCase4")},
|
385
418
|
[:test, {:name => "test4_1"}],
|
386
419
|
[:test, {:name => "test4_2"}]],
|
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.3.
|
4
|
+
version: 3.3.2
|
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: 2019-
|
12
|
+
date: 2019-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: power_assert
|
@@ -232,48 +232,48 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
232
232
|
version: '0'
|
233
233
|
requirements: []
|
234
234
|
rubyforge_project:
|
235
|
-
rubygems_version: 2.7.6
|
235
|
+
rubygems_version: 2.7.6.2
|
236
236
|
signing_key:
|
237
237
|
specification_version: 4
|
238
238
|
summary: An xUnit family unit testing framework for Ruby.
|
239
239
|
test_files:
|
240
|
-
- test/
|
241
|
-
- test/
|
242
|
-
- test/test-
|
243
|
-
- test/test-
|
244
|
-
- test/
|
245
|
-
- test/test-failure.rb
|
246
|
-
- test/test-color.rb
|
247
|
-
- test/ui/test_testrunmediator.rb
|
248
|
-
- test/test-attribute-matcher.rb
|
249
|
-
- test/test-test-suite.rb
|
250
|
-
- test/test-test-suite-creator.rb
|
240
|
+
- test/util/test_procwrapper.rb
|
241
|
+
- test/util/test_observable.rb
|
242
|
+
- test/util/test-output.rb
|
243
|
+
- test/util/test-method-owner-finder.rb
|
244
|
+
- test/util/test_backtracefilter.rb
|
251
245
|
- test/test-diff.rb
|
246
|
+
- test/test-assertions.rb
|
247
|
+
- test/testunit-test-util.rb
|
248
|
+
- test/run-test.rb
|
252
249
|
- test/test-emacs-runner.rb
|
253
|
-
- test/test-
|
254
|
-
- test/
|
255
|
-
- test/
|
256
|
-
- test/
|
257
|
-
- test/
|
250
|
+
- test/test-color.rb
|
251
|
+
- test/test-pending.rb
|
252
|
+
- test/test-omission.rb
|
253
|
+
- test/test-color-scheme.rb
|
254
|
+
- test/test-test-result.rb
|
255
|
+
- test/test-test-suite.rb
|
256
|
+
- test/test-code-snippet.rb
|
257
|
+
- test/test-test-case.rb
|
258
|
+
- test/test-failure.rb
|
258
259
|
- test/fixtures/no-header.csv
|
259
260
|
- test/fixtures/header-label.tsv
|
261
|
+
- test/fixtures/no-header.tsv
|
262
|
+
- test/fixtures/header.csv
|
260
263
|
- test/fixtures/header-label.csv
|
261
|
-
- test/
|
262
|
-
- test/
|
263
|
-
- test/
|
264
|
+
- test/fixtures/plus.csv
|
265
|
+
- test/fixtures/header.tsv
|
266
|
+
- test/ui/test_testrunmediator.rb
|
267
|
+
- test/test-fixture.rb
|
268
|
+
- test/test-priority.rb
|
269
|
+
- test/test-test-suite-creator.rb
|
270
|
+
- test/test-attribute.rb
|
271
|
+
- test/test-notification.rb
|
272
|
+
- test/test-attribute-matcher.rb
|
273
|
+
- test/test-fault-location-detector.rb
|
274
|
+
- test/collector/test-descendant.rb
|
275
|
+
- test/collector/test_objectspace.rb
|
264
276
|
- test/collector/test-load.rb
|
265
277
|
- test/collector/test_dir.rb
|
266
|
-
- test/collector/test_objectspace.rb
|
267
|
-
- test/collector/test-descendant.rb
|
268
278
|
- test/test-error.rb
|
269
|
-
- test/
|
270
|
-
- test/test-pending.rb
|
271
|
-
- test/test-fixture.rb
|
272
|
-
- test/util/test-output.rb
|
273
|
-
- test/util/test-method-owner-finder.rb
|
274
|
-
- test/util/test_observable.rb
|
275
|
-
- test/util/test_procwrapper.rb
|
276
|
-
- test/util/test_backtracefilter.rb
|
277
|
-
- test/test-notification.rb
|
278
|
-
- test/test-omission.rb
|
279
|
-
- test/test-test-case.rb
|
279
|
+
- test/test-data.rb
|