test_bench-isolated 2.0.0.4 → 2.0.1.0

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: d9375771e0d1abf769eee3145eb9b9844d025b35aed24f0e97c4105f06a4e571
4
- data.tar.gz: f2833acd1612f360f89f582dbfa58369ffa8f0e22c9c0828bee0a41ffdf62e88
3
+ metadata.gz: ce3c4616782689047188f14c495ac232b470d0e805bf455dcbbd2d8301ed8a0c
4
+ data.tar.gz: 14355e880088815320512a68c7ad2f4baf7dc549c48d052012db82a1fe26733d
5
5
  SHA512:
6
- metadata.gz: 85cd5bef0f916954f7ce6f38009a05dab83968d24f16a6b5b34ac75ca250584a4f592a274fad51d59db8e1e3dd0ad21d5703b5ee3dda935dde58b5604788b680
7
- data.tar.gz: 1b9e6fa798eb63bad067a8972d505adde572855091e239dda9fe6786053951bc4afcb4044b92dec4d44608f8e6e5772041d67b7444aec90e4265a2bd9674d018
6
+ metadata.gz: 707d6e4274a07fbd65ea1abea6cff250d00e4c0a4eaef9c20617041d0af1d222d4692ac2877f09aea3609e2bb459d35cb06f1dd6771e22c553df52de9c797546
7
+ data.tar.gz: 5f919785a59e8778abee82c1a33a1224d2ec7bff1671fd5049ea6df98c08bc898d1c89c89370248dd567a90505b074a34f83aa09a63e994d858579b7475b66f4
@@ -162,7 +162,7 @@ module TestBenchIsolated
162
162
 
163
163
  env['TEST_BENCH_EXCLUDE_FILE_PATTERN'] = exclude_pattern_text
164
164
 
165
- when '-f', '--only-failure', '--no-only-failure'
165
+ when '-f', '-F', '--only-failure', '--no-only-failure'
166
166
  if not negated?(switch)
167
167
  only_failure_text = 'on'
168
168
  else
@@ -171,6 +171,15 @@ module TestBenchIsolated
171
171
 
172
172
  env['TEST_BENCH_ONLY_FAILURE'] = only_failure_text
173
173
 
174
+ when '-p', '-P', '--require-passing-tests', '--no-require-passing-tests'
175
+ if not negated?(switch)
176
+ require_passing_tests = 'on'
177
+ else
178
+ require_passing_tests = 'off'
179
+ end
180
+
181
+ env['TEST_BENCH_REQUIRE_PASSING_TESTS'] = require_passing_tests
182
+
174
183
  when '-o', '--output-styling'
175
184
  output_styling_text = switch_value(argument_index) do
176
185
  'on'
@@ -238,7 +247,11 @@ module TestBenchIsolated
238
247
  end
239
248
 
240
249
  def negated?(switch)
241
- switch.start_with?('--no-')
250
+ if switch.start_with?('--')
251
+ switch.start_with?('--no-')
252
+ else
253
+ /^-[A-Z]/.match?(switch)
254
+ end
242
255
  end
243
256
 
244
257
  def exit_code?
@@ -68,7 +68,17 @@ module TestBenchIsolated
68
68
  end
69
69
 
70
70
  def passed?
71
- asserted? && !failed? && !skipped?
71
+ if failed?
72
+ false
73
+ elsif require_passing_test?
74
+ asserted? && !skipped?
75
+ else
76
+ true
77
+ end
78
+ end
79
+
80
+ def require_passing_test?
81
+ Defaults.require_passing_tests
72
82
  end
73
83
 
74
84
  def fixture(name, &block)
@@ -238,6 +248,12 @@ module TestBenchIsolated
238
248
  def self.no_assertion_message
239
249
  "Test didn't perform an assertion"
240
250
  end
251
+
252
+ module Defaults
253
+ def self.require_passing_tests
254
+ ENV.fetch('TEST_BENCH_REQUIRE_PASSING_TEST', 'on') == 'on'
255
+ end
256
+ end
241
257
  end
242
258
  end
243
259
  end
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_bench-isolated
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.4
4
+ version: 2.0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Ladd
8
8
  autorequire:
9
9
  bindir: script
10
10
  cert_chain: []
11
- date: 2023-08-22 00:00:00.000000000 Z
11
+ date: 2023-08-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: nathanladd+github@gmail.com
15
15
  executables:
16
- - bench-isolated
16
+ - bench
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
@@ -166,7 +166,7 @@ files:
166
166
  - lib/test_bench_isolated/test_bench/telemetry/substitute/sink.rb
167
167
  - lib/test_bench_isolated/test_bench/telemetry/telemetry.rb
168
168
  - lib/test_bench_isolated/test_bench/test_bench.rb
169
- - script/bench-isolated
169
+ - script/bench
170
170
  homepage: https://github.com/test-bench/test-bench-isolated
171
171
  licenses:
172
172
  - MIT
File without changes