minitest-allow 1.3.0 → 1.3.1
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +7 -0
- data/Rakefile +1 -1
- data/lib/minitest/allow_plugin.rb +66 -61
- data/test/minitest/test_allow_plugin.rb +3 -1
- data.tar.gz.sig +0 -0
- metadata +9 -9
- 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: 81c5b703a6b3a11ed51e45dbe6682982ad3c313860f146b8ce84ffbb6974be61
|
|
4
|
+
data.tar.gz: 4c13fe08e38ef0fb6758a943528d1930f9e0c9b3733756eca476134dc000cdca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f7445d6356f5022bda0f598900ca0985d92e068346fcb68dd10dd757dc59d319d1ffdfbaa40389d41d006536f40af62dd615004b0ce1c2d890db69bc95166c77
|
|
7
|
+
data.tar.gz: 402b18c3e04beffa8a5fbadb3d7267ba4d87286ee4eb35b2f772dca915f997ac9993d8d45b5229298a23fcfb5bd8e0865998185ea10d18d4494682e685105c2d
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/History.rdoc
CHANGED
data/Rakefile
CHANGED
|
@@ -1,60 +1,6 @@
|
|
|
1
1
|
module Minitest
|
|
2
|
-
def self.plugin_allow_options opts, _options # :nodoc:
|
|
3
|
-
@allow = @allow_save = false
|
|
4
|
-
@run_only = []
|
|
5
|
-
|
|
6
|
-
opts.on "-c", "--check=path", String, "Run only the tests listed in the allowed file. Overwrites the current file." do |f|
|
|
7
|
-
require "psych"
|
|
8
|
-
|
|
9
|
-
@run_only = if Psych.respond_to? :safe_load_file
|
|
10
|
-
Psych.safe_load_file f, permitted_classes: [Regexp]
|
|
11
|
-
else
|
|
12
|
-
Psych.load_file f
|
|
13
|
-
end || []
|
|
14
|
-
@allow_save = f
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
opts.on "-a", "--allow=path", String, "Allow listed tests to fail." do |f|
|
|
18
|
-
# don't ask why I'm using this specifically:
|
|
19
|
-
require "psych"
|
|
20
|
-
|
|
21
|
-
@allow = if Psych.respond_to? :safe_load_file then
|
|
22
|
-
Psych.safe_load_file f, permitted_classes: [Regexp]
|
|
23
|
-
else
|
|
24
|
-
Psych.load_file f
|
|
25
|
-
end || []
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
opts.on "-A", "--save-allow=path", String, "Save failing tests." do |f|
|
|
29
|
-
require "psych"
|
|
30
|
-
@allow_save = f
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def self.plugin_allow_init options # :nodoc:
|
|
35
|
-
if @allow || @allow_save then
|
|
36
|
-
self.reporter.extend Allow
|
|
37
|
-
self.reporter.allow = @allow
|
|
38
|
-
self.reporter.allow_save = @allow_save
|
|
39
|
-
self.reporter.allow_seen = []
|
|
40
|
-
end
|
|
41
|
-
Minitest::Allow.run_only = @run_only
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
class Result # TODO: push up
|
|
45
|
-
def full_name
|
|
46
|
-
"%s#%s" % [klass, name]
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
class Minitest::Test # sigh... rails
|
|
51
|
-
def full_name
|
|
52
|
-
"%s#%s" % [self.class, name]
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
|
|
56
2
|
module Allow
|
|
57
|
-
VERSION = "1.3.
|
|
3
|
+
VERSION = "1.3.1"
|
|
58
4
|
|
|
59
5
|
attr_accessor :allow, :allow_save, :allow_seen
|
|
60
6
|
|
|
@@ -181,11 +127,70 @@ module Minitest
|
|
|
181
127
|
super # CompositeReporter#passed?
|
|
182
128
|
end
|
|
183
129
|
end
|
|
184
|
-
end
|
|
185
130
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
131
|
+
def self.plugin_allow_options opts, _options # :nodoc:
|
|
132
|
+
@allow = @allow_save = false
|
|
133
|
+
@run_only = []
|
|
134
|
+
|
|
135
|
+
opts.on "-c", "--check=path", String, "Run only the tests listed in the allowed file. Overwrites the current file." do |f|
|
|
136
|
+
require "psych"
|
|
137
|
+
|
|
138
|
+
@run_only = if Psych.respond_to? :safe_load_file
|
|
139
|
+
Psych.safe_load_file f, permitted_classes: [Regexp]
|
|
140
|
+
else
|
|
141
|
+
Psych.load_file f
|
|
142
|
+
end || []
|
|
143
|
+
@allow_save = f
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
opts.on "-a", "--allow=path", String, "Allow listed tests to fail." do |f|
|
|
147
|
+
# don't ask why I'm using this specifically:
|
|
148
|
+
require "psych"
|
|
149
|
+
|
|
150
|
+
@allow = if Psych.respond_to? :safe_load_file then
|
|
151
|
+
Psych.safe_load_file f, permitted_classes: [Regexp]
|
|
152
|
+
else
|
|
153
|
+
Psych.load_file f
|
|
154
|
+
end || []
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
opts.on "-A", "--save-allow=path", String, "Save failing tests." do |f|
|
|
158
|
+
require "psych"
|
|
159
|
+
@allow_save = f
|
|
160
|
+
end
|
|
190
161
|
end
|
|
191
|
-
|
|
162
|
+
|
|
163
|
+
def self.plugin_allow_init options # :nodoc:
|
|
164
|
+
if @allow || @allow_save then
|
|
165
|
+
self.reporter.extend Allow
|
|
166
|
+
self.reporter.allow = @allow
|
|
167
|
+
self.reporter.allow_save = @allow_save
|
|
168
|
+
self.reporter.allow_seen = []
|
|
169
|
+
end
|
|
170
|
+
Minitest::Allow.run_only = @run_only
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
class Result # TODO: push up
|
|
174
|
+
def full_name
|
|
175
|
+
"%s#%s" % [klass, name]
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
class Minitest::Test # sigh... rails
|
|
180
|
+
def full_name
|
|
181
|
+
"%s#%s" % [self.class, name]
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
module CheckRunOverride
|
|
186
|
+
msg = Minitest.respond_to?(:run_all_suites) ? :run_all_suites : :__run
|
|
187
|
+
|
|
188
|
+
define_method msg do |reporter, options = {}|
|
|
189
|
+
options[:filter] = Regexp.union Minitest::Allow.run_only unless
|
|
190
|
+
Minitest::Allow.run_only.empty?
|
|
191
|
+
super reporter, options
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
singleton_class.prepend CheckRunOverride
|
|
196
|
+
end
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: minitest-allow
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Davis
|
|
@@ -34,14 +34,14 @@ dependencies:
|
|
|
34
34
|
name: minitest
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
|
-
- - "
|
|
37
|
+
- - ">"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: '5.0'
|
|
40
40
|
type: :runtime
|
|
41
41
|
prerelease: false
|
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
|
43
43
|
requirements:
|
|
44
|
-
- - "
|
|
44
|
+
- - ">"
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
46
|
version: '5.0'
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
@@ -50,34 +50,34 @@ dependencies:
|
|
|
50
50
|
requirements:
|
|
51
51
|
- - ">="
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '
|
|
53
|
+
version: '6.0'
|
|
54
54
|
- - "<"
|
|
55
55
|
- !ruby/object:Gem::Version
|
|
56
|
-
version: '
|
|
56
|
+
version: '8'
|
|
57
57
|
type: :development
|
|
58
58
|
prerelease: false
|
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
|
60
60
|
requirements:
|
|
61
61
|
- - ">="
|
|
62
62
|
- !ruby/object:Gem::Version
|
|
63
|
-
version: '
|
|
63
|
+
version: '6.0'
|
|
64
64
|
- - "<"
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
|
-
version: '
|
|
66
|
+
version: '8'
|
|
67
67
|
- !ruby/object:Gem::Dependency
|
|
68
68
|
name: hoe
|
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
|
70
70
|
requirements:
|
|
71
71
|
- - "~>"
|
|
72
72
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: '4.
|
|
73
|
+
version: '4.5'
|
|
74
74
|
type: :development
|
|
75
75
|
prerelease: false
|
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
|
77
77
|
requirements:
|
|
78
78
|
- - "~>"
|
|
79
79
|
- !ruby/object:Gem::Version
|
|
80
|
-
version: '4.
|
|
80
|
+
version: '4.5'
|
|
81
81
|
description: |-
|
|
82
82
|
Allows you to provide an exclusion list of allowed failures/errors.
|
|
83
83
|
Failures and errors on this list still get run and reported as usual,
|
metadata.gz.sig
CHANGED
|
Binary file
|