minitest-focus 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/History.txt +6 -0
- data/README.txt +4 -2
- data/lib/minitest/focus.rb +1 -1
- data/lib/minitest/focus_plugin.rb +15 -6
- data.tar.gz.sig +0 -0
- metadata +14 -14
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8205d96cee68f29a319ec0ee22e979ca1ec258e7cc28fdd9462921a39731c1a
|
4
|
+
data.tar.gz: 636e1401fa03e03508b7af754e6b0bf00131974481a920ab9674ea0e01e30666
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ddc8573f114482ff32fba5bd7a5521d63479e610ca803a9fedbe1855b92e56715b19e39a782432f6220e53530d652e728342922935fb177ed70d9e3f95e4cdf
|
7
|
+
data.tar.gz: 746729444cce678da87831cd1683987fe53b794c882ba6c726f9a5212401bd61b798169984d7cc61a1a40a931692e3d2c72001c6d1d66afa30812b7a157f1113
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -7,7 +7,7 @@ rdoc :: http://docs.seattlerb.org/minitest-focus
|
|
7
7
|
|
8
8
|
Allows you to focus on a few tests with ease without having to use
|
9
9
|
command-line arguments. Good for tools like guard that don't have
|
10
|
-
enough brains to understand test output. Cf.
|
10
|
+
enough brains to understand test output. Cf. minitest-autotest (an
|
11
11
|
example of a test runner with strong testing logic).
|
12
12
|
|
13
13
|
Inspired by https://github.com/seattlerb/minitest/issues/213
|
@@ -16,13 +16,15 @@ Inspired by https://github.com/seattlerb/minitest/issues/213
|
|
16
16
|
|
17
17
|
* `focus` class method allows you to specify that the next test
|
18
18
|
defined should be run.
|
19
|
+
* Use --no-focus to temporarily disable or override with --name
|
20
|
+
arguments.
|
19
21
|
|
20
22
|
== SYNOPSIS:
|
21
23
|
|
22
24
|
require "minitest/autorun"
|
23
25
|
require "minitest/focus"
|
24
26
|
|
25
|
-
class MyTest <
|
27
|
+
class MyTest < Minitest::Test
|
26
28
|
def test_unrelated; ...; end # will NOT run
|
27
29
|
|
28
30
|
focus def test_method2; ...; end # will run (direct--preferred)
|
data/lib/minitest/focus.rb
CHANGED
@@ -1,18 +1,27 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Minitest
|
4
|
-
def self.plugin_focus_options
|
4
|
+
def self.plugin_focus_options opts, options
|
5
|
+
opts.on "--no-focus", "Disable `focus` calls in tests." do |n|
|
6
|
+
@nofocus = true
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.plugin_focus_init options # :nodoc:
|
5
11
|
return unless Minitest::Test.respond_to? :filtered_names
|
6
12
|
return if Minitest::Test.filtered_names.empty?
|
7
13
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
14
|
+
if options[:filter] then
|
15
|
+
order = %w[ `focus` --name ]
|
16
|
+
a, b = @nofocus ? order : order.reverse
|
17
|
+
extra = " Use --no-focus to override." unless @nofocus
|
18
|
+
warn "Ignoring #{a} filters in favor of #{b} filters.#{extra}"
|
19
|
+
warn ""
|
12
20
|
end
|
13
21
|
|
14
|
-
|
22
|
+
return if @nofocus
|
15
23
|
|
24
|
+
re = "/^(#{Regexp.union(Minitest::Test.filtered_names).source})$/"
|
16
25
|
options[:filter] = re
|
17
26
|
end
|
18
27
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-focus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -10,9 +10,9 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDPjCCAiagAwIBAgIBBzANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
14
14
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
-
|
15
|
+
GRYDY29tMB4XDTIzMDEwMTA3NTExN1oXDTI0MDEwMTA3NTExN1owRTETMBEGA1UE
|
16
16
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
17
17
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
18
18
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -22,14 +22,14 @@ cert_chain:
|
|
22
22
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
23
23
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
24
24
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
AQAkg3y+PBnBAPWdxxITm5sPHqdWQgSyCpRA20o4LTuWr8BWhSXBkfQNa7cY6fOn
|
26
|
+
xyM34VPzBFbExv6XOGDfOMFBVaYTHuN9peC/5/umL7kLl+nflXzL2QA7K6LYj5Bg
|
27
|
+
sM574Onr0dZDM6Vn69bzQ7rBIFDfK/OhlPzqKZad4nsdcsVH8ODCiT+ATMIZyz5K
|
28
|
+
WCnNtqlyiWXI8tdTpahDgcUwfcN/oN7v4K8iU5IbLJX6HQ5DKgmKjfb6XyMth16k
|
29
|
+
ROfWo9Uyp8ba/j9eVG14KkYRaLydAY1MNQk2yd3R5CGfeOpD1kttxjoypoUJ2dOG
|
30
|
+
nsNBRuQJ1UfiCG97a6DNm+Fr
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
32
|
+
date: 2023-07-12 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: minitest
|
@@ -77,18 +77,18 @@ dependencies:
|
|
77
77
|
requirements:
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
80
|
+
version: '4.0'
|
81
81
|
type: :development
|
82
82
|
prerelease: false
|
83
83
|
version_requirements: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
85
|
- - "~>"
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version: '
|
87
|
+
version: '4.0'
|
88
88
|
description: |-
|
89
89
|
Allows you to focus on a few tests with ease without having to use
|
90
90
|
command-line arguments. Good for tools like guard that don't have
|
91
|
-
enough brains to understand test output. Cf.
|
91
|
+
enough brains to understand test output. Cf. minitest-autotest (an
|
92
92
|
example of a test runner with strong testing logic).
|
93
93
|
|
94
94
|
Inspired by https://github.com/seattlerb/minitest/issues/213
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
|
-
rubygems_version: 3.
|
134
|
+
rubygems_version: 3.4.10
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: Allows you to focus on a few tests with ease without having to use command-line
|
metadata.gz.sig
CHANGED
Binary file
|