maxitest 5.7.1 → 5.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mtest +22 -0
- data/lib/maxitest/vendor/around.rb +8 -8
- data/lib/maxitest/vendor/line.rb +6 -7
- data/lib/maxitest/vendor/line_describe.rb +2 -2
- data/lib/maxitest/vendor/rg.rb +4 -4
- data/lib/maxitest/vendor/testrbl.rb +2 -23
- data/lib/maxitest/version.rb +1 -1
- data/lib/minitest/maxitest_plugin.rb +5 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a898a4cd9be18178bf78284cb70ad4cc25cd41f372c7f1534683022a4d9f0a61
|
4
|
+
data.tar.gz: 5c58ebb5c28c591c90205daa22c07b4bce05bec303fbc3e4ed2943381152304b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff9ebcfd0ab7a655609919820338b999425e766e99dee328f1c306c24d9b0526808a71c732b320624edebabf19c917a5a0dd6e46aa51c45cb83f018d7d409f75
|
7
|
+
data.tar.gz: 376ba4ebae9e2be6018994f676d00cd6dd46622300a0e2ee42cd688f484ebeb35605b358b55afb13cb691c881a6d2d54ab86032fd6a91f124caeff622721b44f
|
data/bin/mtest
CHANGED
@@ -1,4 +1,25 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# parse raw -v but not verbose
|
4
|
+
if ARGV == ["-v"] || ARGV == ["--version"]
|
5
|
+
puts Maxitest::VERSION
|
6
|
+
exit 0
|
7
|
+
end
|
8
|
+
|
9
|
+
# parse raw -h
|
10
|
+
if ARGV == ["-h"] || ARGV == ["--help"]
|
11
|
+
puts <<~EOF
|
12
|
+
test given file, folder or file:line
|
13
|
+
Usage: mtest foo_test.rb
|
14
|
+
|
15
|
+
-v to run without bracktrace cleaner
|
16
|
+
--changed to run all all tests in current `git diff` or `git show`
|
17
|
+
EOF
|
18
|
+
exit 0
|
19
|
+
end
|
20
|
+
|
21
|
+
# send rest to testrbl to get --changed support, but do not guess at lines but just convert number to -l
|
22
|
+
# so minitest-line picks it up
|
2
23
|
require 'optparse'
|
3
24
|
|
4
25
|
$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
|
@@ -9,4 +30,5 @@ class << Maxitest::Testrbl
|
|
9
30
|
[file, "-l", line]
|
10
31
|
end
|
11
32
|
end
|
33
|
+
|
12
34
|
Maxitest::Testrbl.run_from_cli(ARGV)
|
@@ -1,5 +1,5 @@
|
|
1
|
-
# https://raw.githubusercontent.com/splattael/minitest-around/master/LICENSE
|
2
1
|
# BEGIN generated by rake update, do not modify
|
2
|
+
# https://raw.githubusercontent.com/splattael/minitest-around/master/LICENSE
|
3
3
|
=begin
|
4
4
|
Copyright (c) 2012 Peter Suschlik
|
5
5
|
Copyright (c) 2018 Peter Leitzen (Suschlik)
|
@@ -25,17 +25,17 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
25
25
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
26
26
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27
27
|
=end
|
28
|
-
#END generated by rake update, do not modify
|
28
|
+
# END generated by rake update, do not modify
|
29
29
|
|
30
|
-
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/version.rb
|
31
30
|
# BEGIN generated by rake update, do not modify
|
31
|
+
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/version.rb
|
32
32
|
module MinitestAround
|
33
33
|
VERSION = '0.5.0'
|
34
34
|
end
|
35
|
-
#END generated by rake update, do not modify
|
35
|
+
# END generated by rake update, do not modify
|
36
36
|
|
37
|
-
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/unit.rb
|
38
37
|
# BEGIN generated by rake update, do not modify
|
38
|
+
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/unit.rb
|
39
39
|
Minitest::Test.class_eval do
|
40
40
|
alias_method :run_without_around, :run
|
41
41
|
def run(*args)
|
@@ -48,10 +48,10 @@ Minitest::Test.class_eval do
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
51
|
-
#END generated by rake update, do not modify
|
51
|
+
# END generated by rake update, do not modify
|
52
52
|
|
53
|
-
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/spec.rb
|
54
53
|
# BEGIN generated by rake update, do not modify
|
54
|
+
# https://raw.githubusercontent.com/splattael/minitest-around/master/lib/minitest/around/spec.rb
|
55
55
|
Minitest::Spec::DSL.class_eval do
|
56
56
|
# - resume to call first part
|
57
57
|
# - execute test
|
@@ -92,4 +92,4 @@ Minitest::Spec::DSL.class_eval do
|
|
92
92
|
end)
|
93
93
|
end
|
94
94
|
end
|
95
|
-
#END generated by rake update, do not modify
|
95
|
+
# END generated by rake update, do not modify
|
data/lib/maxitest/vendor/line.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
|
-
require 'pathname'
|
2
|
-
|
3
|
-
# https://raw.githubusercontent.com/judofyr/minitest-line/master/MIT-LICENSE.txt
|
4
1
|
# BEGIN generated by rake update, do not modify
|
2
|
+
# https://raw.githubusercontent.com/judofyr/minitest-line/master/MIT-LICENSE.txt
|
5
3
|
=begin
|
6
4
|
Copyright (c) 2014 Magnus Holm
|
7
5
|
|
@@ -24,10 +22,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
24
22
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
25
23
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
26
24
|
=end
|
27
|
-
#END generated by rake update, do not modify
|
25
|
+
# END generated by rake update, do not modify
|
28
26
|
|
29
|
-
# https://raw.githubusercontent.com/judofyr/minitest-line/master/lib/minitest/line_plugin.rb
|
30
27
|
# BEGIN generated by rake update, do not modify
|
28
|
+
# https://raw.githubusercontent.com/judofyr/minitest-line/master/lib/minitest/line_plugin.rb
|
31
29
|
module Minitest
|
32
30
|
module Line
|
33
31
|
class << self
|
@@ -102,6 +100,7 @@ module Minitest
|
|
102
100
|
io.puts
|
103
101
|
io.puts "Focus on failing tests:"
|
104
102
|
pwd = Pathname.new(Dir.pwd)
|
103
|
+
bin_rails = File.exist?("bin/rails")
|
105
104
|
@failures.each do |res|
|
106
105
|
result = (res.respond_to?(:source_location) ? res : res.method(res.name))
|
107
106
|
file, line = result.source_location
|
@@ -109,7 +108,7 @@ module Minitest
|
|
109
108
|
if file
|
110
109
|
file = Pathname.new(file)
|
111
110
|
file = file.relative_path_from(pwd) if file.absolute?
|
112
|
-
output = "mtest #{file}:#{line}"
|
111
|
+
output = "#{bin_rails ? "bin/rails test" : "mtest"} #{file}:#{line}"
|
113
112
|
output = "\e[31m#{output}\e[0m" if $stdout.tty?
|
114
113
|
io.puts output
|
115
114
|
end
|
@@ -120,4 +119,4 @@ module Minitest
|
|
120
119
|
def self.plugin_line_inject_reporter
|
121
120
|
end
|
122
121
|
end
|
123
|
-
#END generated by rake update, do not modify
|
122
|
+
# END generated by rake update, do not modify
|
@@ -1,5 +1,5 @@
|
|
1
|
-
# https://raw.githubusercontent.com/judofyr/minitest-line/master/lib/minitest/line/describe_track.rb
|
2
1
|
# BEGIN generated by rake update, do not modify
|
2
|
+
# https://raw.githubusercontent.com/judofyr/minitest-line/master/lib/minitest/line/describe_track.rb
|
3
3
|
module Minitest
|
4
4
|
module Line
|
5
5
|
module DescribeTrack
|
@@ -13,4 +13,4 @@ module Minitest
|
|
13
13
|
end
|
14
14
|
|
15
15
|
Object.send(:include, Minitest::Line::DescribeTrack)
|
16
|
-
#END generated by rake update, do not modify
|
16
|
+
# END generated by rake update, do not modify
|
data/lib/maxitest/vendor/rg.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
# https://raw.githubusercontent.com/blowmage/minitest-rg/master/LICENSE
|
2
1
|
# BEGIN generated by rake update, do not modify
|
2
|
+
# https://raw.githubusercontent.com/blowmage/minitest-rg/master/LICENSE
|
3
3
|
=begin
|
4
4
|
Copyright (c) 2012 Mike Moore
|
5
5
|
|
@@ -22,10 +22,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
22
22
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
23
23
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
24
24
|
=end
|
25
|
-
#END generated by rake update, do not modify
|
25
|
+
# END generated by rake update, do not modify
|
26
26
|
|
27
|
-
# https://raw.githubusercontent.com/blowmage/minitest-rg/master/lib/minitest/rg_plugin.rb
|
28
27
|
# BEGIN generated by rake update, do not modify
|
28
|
+
# https://raw.githubusercontent.com/blowmage/minitest-rg/master/lib/minitest/rg_plugin.rb
|
29
29
|
module Minitest
|
30
30
|
def self.plugin_rg_options opts, _options # :nodoc:
|
31
31
|
opts.on "--[no-]rg", "Add red/green to test output." do |bool|
|
@@ -91,4 +91,4 @@ module Minitest
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
end
|
94
|
-
#END generated by rake update, do not modify
|
94
|
+
# END generated by rake update, do not modify
|
@@ -1,10 +1,5 @@
|
|
1
|
-
# Copyright 2014 Michael Grosser under MIT License
|
2
|
-
|
3
|
-
# https://raw.githubusercontent.com/grosser/testrbl/master/lib/testrbl.rb
|
4
1
|
# BEGIN generated by rake update, do not modify
|
5
|
-
|
6
|
-
require 'maxitest/version'
|
7
|
-
|
2
|
+
# https://raw.githubusercontent.com/grosser/testrbl/master/lib/testrbl.rb
|
8
3
|
module Maxitest
|
9
4
|
module Testrbl
|
10
5
|
PATTERNS = [
|
@@ -18,22 +13,6 @@ module Maxitest
|
|
18
13
|
|
19
14
|
class << self
|
20
15
|
def run_from_cli(argv)
|
21
|
-
if argv == ["-v"] || argv == ["--version"]
|
22
|
-
puts Maxitest::VERSION
|
23
|
-
exit 0
|
24
|
-
end
|
25
|
-
|
26
|
-
if argv == ["-h"] || argv == ["--help"]
|
27
|
-
puts <<~EOF
|
28
|
-
test given file, folder or file:line
|
29
|
-
Usage: mtest foo_test.rb
|
30
|
-
|
31
|
-
-v to run without bracktrace cleaner
|
32
|
-
--changed to run all all tests in current `git diff` or `git show`
|
33
|
-
EOF
|
34
|
-
exit 0
|
35
|
-
end
|
36
|
-
|
37
16
|
files, options = partition_argv(argv)
|
38
17
|
files.concat(changed_files) if options.delete("--changed")
|
39
18
|
files = ["test"] if files.empty?
|
@@ -212,4 +191,4 @@ module Maxitest
|
|
212
191
|
end
|
213
192
|
end
|
214
193
|
end
|
215
|
-
#END generated by rake update, do not modify
|
194
|
+
# END generated by rake update, do not modify
|
data/lib/maxitest/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# we are not enabling our extensions unless maxitest/autorun was loaded
|
2
|
-
#
|
2
|
+
# minitest plugin system auto-loads all files in the load path and that would
|
3
3
|
# always enable all our plugins even if they were not wanted
|
4
4
|
if defined?(Maxitest::ENABLE_PLUGINS) && Maxitest::ENABLE_PLUGINS
|
5
5
|
disabled_for_rails = begin
|
@@ -12,13 +12,15 @@ if defined?(Maxitest::ENABLE_PLUGINS) && Maxitest::ENABLE_PLUGINS
|
|
12
12
|
# rails has --backtrace which disables rails own backtrace cleaner, but not minitests
|
13
13
|
require "maxitest/verbose_backtrace"
|
14
14
|
|
15
|
-
unless disabled_for_rails # rails 5
|
15
|
+
unless disabled_for_rails # rails 5 adds default red/green output
|
16
16
|
require "maxitest/vendor/rg"
|
17
17
|
Minitest.extensions << "rg"
|
18
18
|
Minitest::RG.rg! $stdout.tty?
|
19
19
|
end
|
20
20
|
|
21
|
-
#
|
21
|
+
# rails 5.2+ has it's own line support
|
22
|
+
# - it breaks `mtest file:line` format
|
23
|
+
# - we still want our format with the nice summary at the end, even if the `bin/rails test` output is already inline
|
22
24
|
require "maxitest/vendor/line"
|
23
25
|
Minitest.extensions << "line"
|
24
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maxitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10
|
11
|
+
date: 2024-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|