test_bench-isolated 2.0.0.5 → 2.0.1.1

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: e459a1635202ab637163b0bf8dc29c1298376ef56ff1a4dcff1298a60ac7560d
4
- data.tar.gz: 9754b43288660c1029f33e7417ae8c26679a7aadc25833882b1ee502e4c505c0
3
+ metadata.gz: b8c4e50b7f2d5e1cbd86b9f23987d14fd124c395bd976017a8fcd0b3ce7b0dcb
4
+ data.tar.gz: 3f395daa065a54ff9bba1737baf447ed4ccff851f52d803744a4ac16b2313e5b
5
5
  SHA512:
6
- metadata.gz: acab86b502aa9963e563e6c733117afab0cbda2c540e439edfc4164038229d22f223a9234e30a7d55f8cb4efd71d873dbc29de5beaf0eb5a5476883ed4ca220e
7
- data.tar.gz: 7b2da3427a3b03a67f9e3cb4f9e43bccb22e982a08f2a94fb7b4efbe91d41a7e7fc2dc0edeb95ac2c8ac3409bc020ed54b54c3d567edb89c4b888ae3354895a9
6
+ metadata.gz: dfc325854c01024b2449a800bb6699c9cfaead49d14399cfdf6ef1278d8b27dc9c92eb59c526d82d487f35fbd8d25e50cda6fee9fc6db613a541a300aac02290
7
+ data.tar.gz: 4e1c24ff66019d8efba5f67df2d0eaa592a9ac59be51fdd4966f5a5411025ee2d638e1940df6b1e88c325b084e323f822b0c7b44fa3b23a11155c7bb09a284cd
@@ -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-test', '--no-require-passing-test'
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_TEST'] = 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
File without changes
metadata CHANGED
@@ -1,23 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_bench-isolated
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.5
4
+ version: 2.0.1.1
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: 2024-01-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: nathanladd+github@gmail.com
15
15
  executables:
16
- - bench
16
+ - bench-isolated
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
- - lib/test_bench/isolated.rb
21
20
  - lib/test_bench_isolated/test_bench.rb
22
21
  - lib/test_bench_isolated/test_bench/cli.rb
23
22
  - lib/test_bench_isolated/test_bench/controls.rb
@@ -166,7 +165,7 @@ files:
166
165
  - lib/test_bench_isolated/test_bench/telemetry/substitute/sink.rb
167
166
  - lib/test_bench_isolated/test_bench/telemetry/telemetry.rb
168
167
  - lib/test_bench_isolated/test_bench/test_bench.rb
169
- - script/bench
168
+ - script/bench-isolated
170
169
  homepage: https://github.com/test-bench/test-bench-isolated
171
170
  licenses:
172
171
  - MIT
@@ -1 +0,0 @@
1
- require 'test_bench_isolated/test_bench'