mighty_test 0.2.0 → 0.3.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: 67f7cd918d844868eef2785d5337b21a23cfb5a77944c6408f01319c948ca0c9
4
- data.tar.gz: 51e988bb537870235b93ddcc638bb14c8445b1ad04af6bf832b4690de20c623a
3
+ metadata.gz: e0a5ab6b78b6d5b8b4a0073ebc938a9fe2dffb4d83a8ae9c9d6dbd7ce665c538
4
+ data.tar.gz: ff523cac9bb63929f65a434bb01688eb2c1634ea8ae79394db99eff40236049f
5
5
  SHA512:
6
- metadata.gz: 17228cb3ed005b781296855e61081f0724788913276323cbd70a8591aa02dbf792476b82ade4494e52ff4940e78f106a9666f905855e1173e9ed42d76bb32306
7
- data.tar.gz: 8a37977044f595aa51530e3d7da4599f62be1bcacadb3e16375168c4815f5550e7e4c9db0dea2997f5bd930c9dfed2c8a0077331d8143d710e0d38a8c6b278db
6
+ metadata.gz: 0c62977fcd28132def5507fd5ea1023109fa04e61aaffc2f765831caf2f633f9ef6efffc308a28244b50c4b401375e22c9e8a8a70b8acbc7731db4dd7650d99e
7
+ data.tar.gz: 2058631fd6e439361a4269d7374377df0019a386d0e5186a63064866bed9809bf33cfb2ae3d3f98a817b55ee5e190233960e0d0ad01b295592508aa7747c77db
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2023 Matt Brictson
3
+ Copyright (c) 2024 Matt Brictson
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -217,6 +217,12 @@ This functionality is provided by the [minitest-rg](https://github.com/minitest/
217
217
 
218
218
  ## 💬 More Options
219
219
 
220
+ Use `-w` to enable Ruby warnings when running tests:
221
+
222
+ ```sh
223
+ bin/mt -w
224
+ ```
225
+
220
226
  Minitest options are passed through to Minitest.
221
227
 
222
228
  ```sh
@@ -82,6 +82,7 @@ module MightyTest
82
82
  end
83
83
 
84
84
  def run_tests_and_exit!(*test_paths, flags: [])
85
+ $VERBOSE = true if extra_args.delete("-w")
85
86
  runner.run_inline_and_exit!(*test_paths, args: extra_args + flags)
86
87
  end
87
88
 
@@ -10,6 +10,7 @@ module MightyTest
10
10
  $LOAD_PATH.unshift "test"
11
11
  ARGV.replace(Array(args))
12
12
 
13
+ require "minitest"
13
14
  require "minitest/focus"
14
15
  require "minitest/rg"
15
16
 
@@ -4,10 +4,10 @@ module MightyTest
4
4
  class OptionParser
5
5
  def parse(argv)
6
6
  argv, literal_args = split(argv, "--")
7
- options = parse_options!(argv)
8
- minitest_flags = parse_minitest_flags!(argv) unless options[:help]
7
+ options, extra_args = parse_options!(argv)
8
+ extra_args += parse_minitest_flags!(argv) unless options[:help]
9
9
 
10
- [argv + literal_args, minitest_flags || [], options]
10
+ [argv + literal_args, extra_args, options]
11
11
  end
12
12
 
13
13
  def to_s
@@ -22,12 +22,15 @@ module MightyTest
22
22
 
23
23
  def parse_options!(argv)
24
24
  options = {}
25
+ extra_args = []
25
26
  options[:all] = true if argv.delete("--all")
26
27
  options[:watch] = true if argv.delete("--watch")
27
28
  options[:version] = true if argv.delete("--version")
28
29
  options[:help] = true if argv.delete("--help") || argv.delete("-h")
29
30
  parse_shard(argv, options)
30
- options
31
+ extra_args << "-w" if argv.delete("-w")
32
+
33
+ [options, extra_args]
31
34
  end
32
35
 
33
36
  def parse_minitest_flags!(argv)
@@ -1,3 +1,3 @@
1
1
  module MightyTest
2
- VERSION = "0.2.0".freeze
2
+ VERSION = "0.3.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mighty_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brictson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-02 00:00:00.000000000 Z
11
+ date: 2024-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: listen
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 3.5.6
128
+ rubygems_version: 3.5.13
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: A modern Minitest runner for TDD, with watch mode and more