test_bench 2.0.0.5 → 2.0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/test_bench/cli.rb +15 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9237f2003d2504baf59d15d7ce5f1b63bb801b7105263fb53bb0eb575bb32481
4
- data.tar.gz: 489bd1ad0e98193ede579331caa88e0d2fbfddeea7ac41224a4f52593f81eadc
3
+ metadata.gz: 339fb7400d20a2699a4f690b95920e807b5a880c712510fd9c0b47b91aeb4bbd
4
+ data.tar.gz: dcc754f0f9086ebe3f7e539fcc8d65b65deb154d5bff036e4257b79983c97105
5
5
  SHA512:
6
- metadata.gz: f439a594dc0eeabc762e6ac98badab11eb8f2f4cde70bc10e6ccdd88c4e7e2cec82dea2c94128db3ff52e021d85e32db29db7745f261e3b022977a4eacbf86e6
7
- data.tar.gz: 6e9b170b316751ce0974c99ece586263e0d0f35677afffa4de3a9fdabcd18bdcd3915095b016e57a576d3515f2a98fe9832d0f7c8e459d9f666304c2e65ee69d
6
+ metadata.gz: c21771939bb210bdd6a2d99ae2ff122e9d315f884b024af32c49f9760a25d13f1829010daa19950ae64854f882f200c23d37420a2fa32697f88cfac829475a1d
7
+ data.tar.gz: 1d81f2b6ada85776244606cc994bf4edf38fcc7c3f4612bf7768394f94a2f670916fe766e22829ea4673f393533ca8a1f0084e0265d433b0819b254125830ac1
@@ -161,7 +161,7 @@ module TestBench
161
161
 
162
162
  env['TEST_BENCH_EXCLUDE_FILE_PATTERN'] = exclude_pattern_text
163
163
 
164
- when '-f', '--only-failure', '--no-only-failure'
164
+ when '-f', '-F', '--only-failure', '--no-only-failure'
165
165
  if not negated?(switch)
166
166
  only_failure_text = 'on'
167
167
  else
@@ -170,6 +170,15 @@ module TestBench
170
170
 
171
171
  env['TEST_BENCH_ONLY_FAILURE'] = only_failure_text
172
172
 
173
+ when '-p', '-P', '--require-passing-tests', '--no-require-passing-tests'
174
+ if not negated?(switch)
175
+ require_passing_tests = 'on'
176
+ else
177
+ require_passing_tests = 'off'
178
+ end
179
+
180
+ env['TEST_BENCH_REQUIRE_PASSING_TESTS'] = require_passing_tests
181
+
173
182
  when '-o', '--output-styling'
174
183
  output_styling_text = switch_value(argument_index) do
175
184
  'on'
@@ -237,7 +246,11 @@ module TestBench
237
246
  end
238
247
 
239
248
  def negated?(switch)
240
- switch.start_with?('--no-')
249
+ if switch.start_with?('--')
250
+ switch.start_with?('--no-')
251
+ else
252
+ /^-[A-Z]/.match?(switch)
253
+ end
241
254
  end
242
255
 
243
256
  def exit_code?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_bench
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.5
4
+ version: 2.0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Ladd