minitest-allow 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +1 -0
- data.tar.gz.sig +0 -0
- data/.autotest +26 -0
- data/History.rdoc +6 -0
- data/Manifest.txt +8 -0
- data/README.rdoc +69 -0
- data/Rakefile +18 -0
- data/allow.yml +2 -0
- data/lib/minitest/allow_plugin.rb +74 -0
- data/test/minitest/test_allow_plugin.rb +10 -0
- metadata +130 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6d4b452b249bcbf28fd6a1fe02554605287695f5132a49355c1ff86d9670050c
|
4
|
+
data.tar.gz: 43f8db6fc12c23fef4ea9ae778f67d49ddfea0a394f599c65258519913682d80
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c440e3f3205155ff80a83bc5abbeb2e70b2a225c50097ae8a25a3346fe11a60d1d845aa71717e80f45649bbb61180926b6dfe8562ef6ae70ea5451e024685255
|
7
|
+
data.tar.gz: cb00914e91781619a1ac7eb85cba9f2734b3163e0abdb96c4f474cf1e916274d6c35dcc82a50d07bf4e34f9bcc670c2f69dca1d063410666f9029cfc232930cd
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
-��&�\!�},:��?�Ʀ���X%(��D>����<�2/|�MHi���Y�qX$�7������1A}?�K���IM*���{������12Ȁ��|�q��$���j���cjj�Hy��+�@�`P8$�Ro�"V#�T���E
|
data.tar.gz.sig
ADDED
Binary file
|
data/.autotest
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require "autotest/restart"
|
4
|
+
|
5
|
+
Autotest.add_hook :initialize do |at|
|
6
|
+
at.testlib = "minitest/autorun"
|
7
|
+
at.add_exception "tmp"
|
8
|
+
|
9
|
+
# at.extra_files << "../some/external/dependency.rb"
|
10
|
+
#
|
11
|
+
# at.libs << ":../some/external"
|
12
|
+
#
|
13
|
+
# at.add_exception "vendor"
|
14
|
+
#
|
15
|
+
# at.add_mapping(/dependency.rb/) do |f, _|
|
16
|
+
# at.files_matching(/test_.*rb$/)
|
17
|
+
# end
|
18
|
+
#
|
19
|
+
# %w(TestA TestB).each do |klass|
|
20
|
+
# at.extra_class_map[klass] = "test/test_misc.rb"
|
21
|
+
# end
|
22
|
+
end
|
23
|
+
|
24
|
+
# Autotest.add_hook :run_command do |at|
|
25
|
+
# system "rake build"
|
26
|
+
# end
|
data/History.rdoc
ADDED
data/Manifest.txt
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
= minitest-allow
|
2
|
+
|
3
|
+
home :: https://github.com/seattlerb/minitest-allow
|
4
|
+
rdoc :: http://docs.seattlerb.org/minitest-allow
|
5
|
+
|
6
|
+
== DESCRIPTION:
|
7
|
+
|
8
|
+
Allows you to provide an exclusion list of allowed failures/errors.
|
9
|
+
Failures and errors on this list still get run and reported as usual,
|
10
|
+
but do not cause a non-zero exit code. This enables you to have a
|
11
|
+
green CI with against a list of known bad tests.
|
12
|
+
|
13
|
+
== FEATURES/PROBLEMS:
|
14
|
+
|
15
|
+
* Run with `-A path/to/allowed.yml` to generate a list of failing tests.
|
16
|
+
* Run with `-a path/to/allowed.yml` to allow listed tests to fail.
|
17
|
+
|
18
|
+
== SYNOPSIS:
|
19
|
+
|
20
|
+
% ruby -Ilib test/has_known_bad_tests.rb -a allow.yml; echo $?
|
21
|
+
# or: rake test TESTOPTS="-a allow.yml"
|
22
|
+
|
23
|
+
Run options: -a allow.yml --seed 5200
|
24
|
+
|
25
|
+
# Running:
|
26
|
+
|
27
|
+
...F...
|
28
|
+
|
29
|
+
Finished in 0.000325s, 3076.9239 runs/s, 3076.9239 assertions/s.
|
30
|
+
|
31
|
+
1) Failure:
|
32
|
+
TestMinitest::TestAllow#test_sanity [test/minitest/test_allow_plugin.rb:8]:
|
33
|
+
write tests or I will kneecap you
|
34
|
+
|
35
|
+
7 runs, 7 assertions, 1 failures, 0 errors, 0 skips
|
36
|
+
0
|
37
|
+
|
38
|
+
== REQUIREMENTS:
|
39
|
+
|
40
|
+
* minitest 5+
|
41
|
+
|
42
|
+
== INSTALL:
|
43
|
+
|
44
|
+
* [sudo] gem install minitest-allow
|
45
|
+
|
46
|
+
== LICENSE:
|
47
|
+
|
48
|
+
(The MIT License)
|
49
|
+
|
50
|
+
Copyright (c) Ryan Davis, seattle.rb
|
51
|
+
|
52
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
53
|
+
a copy of this software and associated documentation files (the
|
54
|
+
'Software'), to deal in the Software without restriction, including
|
55
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
56
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
57
|
+
permit persons to whom the Software is furnished to do so, subject to
|
58
|
+
the following conditions:
|
59
|
+
|
60
|
+
The above copyright notice and this permission notice shall be
|
61
|
+
included in all copies or substantial portions of the Software.
|
62
|
+
|
63
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
64
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
65
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
66
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
67
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
68
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
69
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
require "hoe"
|
5
|
+
|
6
|
+
Hoe.plugin :isolate
|
7
|
+
Hoe.plugin :seattlerb
|
8
|
+
Hoe.plugin :rdoc
|
9
|
+
|
10
|
+
Hoe.spec "minitest-allow" do
|
11
|
+
developer "Ryan Davis", "ryand-ruby@zenspider.com"
|
12
|
+
|
13
|
+
license "MIT"
|
14
|
+
|
15
|
+
dependency "minitest", "~> 5.0"
|
16
|
+
end
|
17
|
+
|
18
|
+
# vim: syntax=ruby
|
data/allow.yml
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
module Minitest
|
2
|
+
def self.plugin_allow_options opts, _options # :nodoc:
|
3
|
+
opts.on "-a", "--allow=path", String, "Allow listed tests to fail." do |f|
|
4
|
+
require "yaml"
|
5
|
+
@allow = YAML.load File.read f
|
6
|
+
end
|
7
|
+
|
8
|
+
opts.on "-A", "--save-allow=path", String, "Save failing tests." do |f|
|
9
|
+
require "yaml"
|
10
|
+
@allow_save = f
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.plugin_allow_init options # :nodoc:
|
15
|
+
if @allow || @allow_save then
|
16
|
+
self.reporter.extend Allow
|
17
|
+
end
|
18
|
+
|
19
|
+
self.reporter.allow = @allow if @allow
|
20
|
+
self.reporter.allow_save = @allow_save if @allow_save
|
21
|
+
end
|
22
|
+
|
23
|
+
class Result # TODO: push up
|
24
|
+
def full_name
|
25
|
+
"%s#%s" % [klass, name]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
module Allow
|
30
|
+
VERSION = "1.0.0"
|
31
|
+
|
32
|
+
attr_accessor :allow, :allow_save
|
33
|
+
|
34
|
+
def allow_results
|
35
|
+
self.reporters
|
36
|
+
.grep(Minitest::StatisticsReporter)
|
37
|
+
.map(&:results)
|
38
|
+
end
|
39
|
+
|
40
|
+
def write_allow
|
41
|
+
data = allow_results
|
42
|
+
.flat_map { |rs| rs.map(&:full_name) }
|
43
|
+
.uniq
|
44
|
+
.sort
|
45
|
+
|
46
|
+
File.write allow_save, data.to_yaml
|
47
|
+
end
|
48
|
+
|
49
|
+
def filter_allow
|
50
|
+
allow_results.each do |results|
|
51
|
+
results.delete_if { |r| allow.delete r.full_name }
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def report_extra_allow
|
56
|
+
unless allow.empty? then
|
57
|
+
io.puts
|
58
|
+
io.puts "Excluded tests that now pass:"
|
59
|
+
io.puts
|
60
|
+
allow.each do |name|
|
61
|
+
io.puts " #{name}"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def passed?
|
67
|
+
write_allow if allow_save
|
68
|
+
filter_allow if allow
|
69
|
+
report_extra_allow if allow
|
70
|
+
|
71
|
+
super # CompositeReporter#passed?
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
metadata
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: minitest-allow
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ryan Davis
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDPjCCAiagAwIBAgIBBTANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
14
|
+
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
+
GRYDY29tMB4XDTIwMTIyMjIwMzgzMFoXDTIxMTIyMjIwMzgzMFowRTETMBEGA1UE
|
16
|
+
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
17
|
+
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
18
|
+
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
19
|
+
taCPaLmfYIaFcHHCSY4hYDJijRQkLxPeB3xbOfzfLoBDbjvx5JxgJxUjmGa7xhcT
|
20
|
+
oOvjtt5P8+GSK9zLzxQP0gVLS/D0FmoE44XuDr3iQkVS2ujU5zZL84mMNqNB1znh
|
21
|
+
GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
|
22
|
+
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
23
|
+
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
24
|
+
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
|
25
|
+
AQAE3XRm1YZcCVjAJy5yMZvTOFrS7B2SYErc+0QwmKYbHztTTDY2m5Bii+jhpuxh
|
26
|
+
H+ETcU1z8TUKLpsBUP4kUpIRowkVN1p/jKapV8T3Rbwq+VuYFe+GMKsf8wGZSecG
|
27
|
+
oMQ8DzzauZfbvhe2kDg7G9BBPU0wLQlY25rDcCy9bLnD7R0UK3ONqpwvsI5I7x5X
|
28
|
+
ZIMXR0a9/DG+55mawwdGzCQobDKiSNLK89KK7OcNTALKU0DfgdTkktdgKchzKHqZ
|
29
|
+
d/AHw/kcnU6iuMUoJEcGiJd4gVCTn1l3cDcIvxakGslCA88Jubw0Sqatan0TnC9g
|
30
|
+
KToW560QIey7SPfHWduzFJnV
|
31
|
+
-----END CERTIFICATE-----
|
32
|
+
date: 2021-04-03 00:00:00.000000000 Z
|
33
|
+
dependencies:
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: minitest
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.0'
|
41
|
+
type: :runtime
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rdoc
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '4.0'
|
55
|
+
- - "<"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '7'
|
58
|
+
type: :development
|
59
|
+
prerelease: false
|
60
|
+
version_requirements: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '4.0'
|
65
|
+
- - "<"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '7'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: hoe
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '3.22'
|
75
|
+
type: :development
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '3.22'
|
82
|
+
description: |-
|
83
|
+
Allows you to provide an exclusion list of allowed failures/errors.
|
84
|
+
Failures and errors on this list still get run and reported as usual,
|
85
|
+
but do not cause a non-zero exit code. This enables you to have a
|
86
|
+
green CI with against a list of known bad tests.
|
87
|
+
email:
|
88
|
+
- ryand-ruby@zenspider.com
|
89
|
+
executables: []
|
90
|
+
extensions: []
|
91
|
+
extra_rdoc_files:
|
92
|
+
- History.rdoc
|
93
|
+
- Manifest.txt
|
94
|
+
- README.rdoc
|
95
|
+
files:
|
96
|
+
- ".autotest"
|
97
|
+
- History.rdoc
|
98
|
+
- Manifest.txt
|
99
|
+
- README.rdoc
|
100
|
+
- Rakefile
|
101
|
+
- allow.yml
|
102
|
+
- lib/minitest/allow_plugin.rb
|
103
|
+
- test/minitest/test_allow_plugin.rb
|
104
|
+
homepage: https://github.com/seattlerb/minitest-allow
|
105
|
+
licenses:
|
106
|
+
- MIT
|
107
|
+
metadata:
|
108
|
+
homepage_uri: https://github.com/seattlerb/minitest-allow
|
109
|
+
post_install_message:
|
110
|
+
rdoc_options:
|
111
|
+
- "--main"
|
112
|
+
- README.rdoc
|
113
|
+
require_paths:
|
114
|
+
- lib
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
requirements: []
|
126
|
+
rubygems_version: 3.2.15
|
127
|
+
signing_key:
|
128
|
+
specification_version: 4
|
129
|
+
summary: Allows you to provide an exclusion list of allowed failures/errors
|
130
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|