test-unit 3.1.1 → 3.1.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 +27 -0
- data/lib/test/unit/autorunner.rb +12 -4
- data/lib/test/unit/testcase.rb +4 -1
- data/lib/test/unit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8be7959401728df47bc4b88eac23413dbd3a86c3
|
4
|
+
data.tar.gz: e33ff36797d6460493b4ffafe735d7e0e7f705b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 069c7c7921016c4aa8c120cc8b35269a92e1d7648af633ad788a65ab9a57e77616d9522a95a76f6f0c46407a49ac55091c2362d37d2254133154e5bccd231e52
|
7
|
+
data.tar.gz: b9141346b7b729e185b1a6dc7608eb594a8ec361cfb6591aa21379c1c0a246b797f2f852971c31aca0f372ff1e9908165a0bc1f58264c93678435566b0e41a15
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 3.1.2 - 2015-06-09 {#version-3-1-2}
|
4
|
+
|
5
|
+
It's command line option improvements fix release.
|
6
|
+
|
7
|
+
### Improvements
|
8
|
+
|
9
|
+
* `--location`: Made path match rule more strict.
|
10
|
+
[Suggested by kimura wataru]
|
11
|
+
* Before:
|
12
|
+
* If test defined path ends with the specified path, the test is
|
13
|
+
matched.
|
14
|
+
* After:
|
15
|
+
* If base name of test defined path equals to the specified
|
16
|
+
path, the test is matched.
|
17
|
+
* If relative path of test defined path equals to the specified
|
18
|
+
path, the test is matched.
|
19
|
+
* If the specified path is absolute path and test defined path
|
20
|
+
equals to the specified path, the test is matched.
|
21
|
+
* `--pattern`: If the option is specified, the default patterns
|
22
|
+
aren't used. In the earlier versions, both the default patterns
|
23
|
+
and the specified patterns are used.
|
24
|
+
[Suggested by kimura wataru]
|
25
|
+
|
26
|
+
### Thanks
|
27
|
+
|
28
|
+
* kimura wataru
|
29
|
+
|
3
30
|
## 3.1.1 - 2015-05-29 {#version-3-1-1}
|
4
31
|
|
5
32
|
It's a bug fix release.
|
data/lib/test/unit/autorunner.rb
CHANGED
@@ -87,8 +87,12 @@ module Test
|
|
87
87
|
register_collector(:load) do |auto_runner|
|
88
88
|
require 'test/unit/collector/load'
|
89
89
|
collector = Collector::Load.new
|
90
|
-
|
91
|
-
|
90
|
+
unless auto_runner.pattern.empty?
|
91
|
+
collector.patterns.replace(auto_runner.pattern)
|
92
|
+
end
|
93
|
+
unless auto_runner.exclude.empty?
|
94
|
+
collector.excludes.replace(auto_runner.exclude)
|
95
|
+
end
|
92
96
|
collector.base = auto_runner.base
|
93
97
|
collector.filter = auto_runner.filters
|
94
98
|
collector.collect(*auto_runner.to_run)
|
@@ -115,8 +119,12 @@ module Test
|
|
115
119
|
require 'test/unit/collector/dir'
|
116
120
|
c = Collector::Dir.new
|
117
121
|
c.filter = auto_runner.filters
|
118
|
-
|
119
|
-
|
122
|
+
unless auto_runner.pattern.empty?
|
123
|
+
c.pattern.replace(auto_runner.pattern)
|
124
|
+
end
|
125
|
+
unless auto_runner.exclude.empty?
|
126
|
+
c.exclude.replace(auto_runner.exclude)
|
127
|
+
end
|
120
128
|
c.base = auto_runner.base
|
121
129
|
$:.push(auto_runner.base) if auto_runner.base
|
122
130
|
c.collect(*(auto_runner.to_run.empty? ? ['.'] : auto_runner.to_run))
|
data/lib/test/unit/testcase.rb
CHANGED
@@ -402,7 +402,10 @@ module Test
|
|
402
402
|
target_locations = []
|
403
403
|
@@method_locations.each do |test_case, locations|
|
404
404
|
locations.each do |location|
|
405
|
-
|
405
|
+
absolete_path = File.expand_path(path)
|
406
|
+
location_path = location[:path]
|
407
|
+
location_basename = File.basename(location_path)
|
408
|
+
if location_path == absolete_path or location_basename == path
|
406
409
|
target_locations << location.merge(:test_case => test_case)
|
407
410
|
end
|
408
411
|
end
|
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.1.
|
4
|
+
version: 3.1.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: 2015-
|
12
|
+
date: 2015-06-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: power_assert
|