test_bench 1.2.0.2 → 1.2.0.8

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
  SHA256:
3
- metadata.gz: e3b488668e7e9d65b4a0ec2adbabb94b9a1cf8e4a29d9e4b1c90b5b3c867fd59
4
- data.tar.gz: 9d4034e73a32b4d694197a1f3ee6a89c9c7843288cdf23934e9aeea4e4136ce8
3
+ metadata.gz: 75966d6cf6ce67d117c91e82985d8d68edde7017b8c342ee923d565af1ecb966
4
+ data.tar.gz: d5078aaddeea8ce9e293f9ba025358400a92cb4383d2318f85edb2cb4eaa635a
5
5
  SHA512:
6
- metadata.gz: 2b49bf38f0ed60504849c6e726fdcbf372d8700b459b1357d967ea472ae76f9ce0ff06c2eef60f0ce438843e5a540c431c80ab9ecc44f6a2f4de18179056e3b0
7
- data.tar.gz: 770d4bf06d1048be6d031a11ce2040f16275296d731f01052dac9ded7632c587424b7af317c94c3b55acbcc1988e9ff93045724fb88c3307aa2614504bc09f8d
6
+ metadata.gz: 7a0b95384cadb14e19d923b70a793014aeb3d5ac783681d7ef1d3693170e85de43969bf2b8c74f3a1e90eb06bb8f2d2563fe3bf666b5ce8986fd45814f403b47
7
+ data.tar.gz: a03c1257cbdee5aeb048f12dedeca28e16078062d712c9552791ab06b020f09b690962aab9699df2d77a2e148103a57c073340b8cbebab09b0dc95071a110ddb
@@ -8,7 +8,7 @@ module TestBench
8
8
  read_stdin = $stdin.stat.pipe?
9
9
 
10
10
  if read_stdin && $stdin.eof?
11
- warn "$stdin is a pipe, but no data was written to it; no test files will be run"
11
+ STDERR.puts "$stdin is a pipe, but no data was written to it; no test files will be run"
12
12
  end
13
13
 
14
14
  Run.(exclude: exclude_file_pattern) do |run|
@@ -66,7 +66,7 @@ TEXT
66
66
  env['TEST_BENCH_ABORT_ON_ERROR'] = abort_on_error ? 'on' : 'off'
67
67
  end
68
68
 
69
- parser.on('-d', '--[no-]detail [DETAIL]', %{Always show (or hide) details (Default: #{Output::Raw::Defaults.detail})}) do |detail|
69
+ parser.on('-d', '--[no-]detail', %{Always show (or hide) details (Default: #{Output::Raw::Defaults.detail})}) do |detail|
70
70
  if detail.nil?
71
71
  detail = 'on'
72
72
  elsif detail == true
@@ -199,12 +199,22 @@ module TestBench
199
199
 
200
200
  color = result ? :green : :red
201
201
 
202
- writer
203
- .indent
204
- .escape_code(color)
205
- .text(text)
206
- .escape_code(:reset_fg)
207
- .newline
202
+ writer.indent
203
+
204
+ if result
205
+ writer.escape_code(:green)
206
+ else
207
+ writer.escape_code(:bold).escape_code(:red)
208
+ end
209
+
210
+ writer.text(text)
211
+
212
+ writer.escape_code(:reset_fg)
213
+ unless result
214
+ writer.escape_code(:reset_intensity)
215
+ end
216
+
217
+ writer.newline
208
218
  end
209
219
 
210
220
  def skip_test(title)
@@ -79,15 +79,15 @@ module TestBench
79
79
  def directory(path)
80
80
  glob_pattern = File.join(path, '**/*.rb')
81
81
 
82
- Dir[glob_pattern].sort.each do |path|
83
- next if exclude_pattern.match?(path)
84
-
82
+ Dir.glob(glob_pattern).sort.each do |path|
85
83
  file(path)
86
84
  end
87
85
  end
88
86
 
89
87
  def file(path)
90
- session.load(path)
88
+ unless exclude_pattern.match?(path)
89
+ session.load(path)
90
+ end
91
91
  end
92
92
 
93
93
  module Defaults
@@ -83,7 +83,7 @@ module TestBench
83
83
 
84
84
  if session.failed?
85
85
  1
86
- elsif session.skip?
86
+ elsif session.skipped?
87
87
  fail_deactivated_tests ? 2 : 0
88
88
  else
89
89
  0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_bench
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.2
4
+ version: 1.2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Ladd
8
8
  autorequire:
9
9
  bindir: script
10
10
  cert_chain: []
11
- date: 2020-08-09 00:00:00.000000000 Z
11
+ date: 2021-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test_bench-fixture
@@ -111,8 +111,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  requirements: []
114
- rubygems_version: 3.1.4
114
+ rubygems_version: 3.1.6
115
115
  signing_key:
116
116
  specification_version: 4
117
- summary: Principled Test Framework for Ruby
117
+ summary: Principled Test Framework for Ruby and MRuby
118
118
  test_files: []