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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9aab3e867096b99241299d05bac77a6219b889c9
4
- data.tar.gz: d37423596384fbe1101e39631bd78460c0f474bd
3
+ metadata.gz: 8be7959401728df47bc4b88eac23413dbd3a86c3
4
+ data.tar.gz: e33ff36797d6460493b4ffafe735d7e0e7f705b5
5
5
  SHA512:
6
- metadata.gz: dfb885607b6ee435b859c3dfe65b9e4fde45322707139d8005b9b61357c8917e3ca4b2ede42ed9d279877380473bfb99063b712769535aee536ee6f54e810c7f
7
- data.tar.gz: bae2d82bc3c5ba69d70f26ecc977574f5c9d017ddc1d88002939496ce1a6426e9799d50e7d9dbad645187e392447b0626776c761470f97112e1a54070ac6472b
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.
@@ -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
- collector.patterns.concat(auto_runner.pattern) if auto_runner.pattern
91
- collector.excludes.concat(auto_runner.exclude) if auto_runner.exclude
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
- c.pattern.concat(auto_runner.pattern) if auto_runner.pattern
119
- c.exclude.concat(auto_runner.exclude) if auto_runner.exclude
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))
@@ -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
- if location[:path].end_with?(path)
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
@@ -1,5 +1,5 @@
1
1
  module Test
2
2
  module Unit
3
- VERSION = '3.1.1'
3
+ VERSION = '3.1.2'
4
4
  end
5
5
  end
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.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-05-29 00:00:00.000000000 Z
12
+ date: 2015-06-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: power_assert