minitest 5.21.0 → 5.21.2

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: ab5059d07c7a9fccdf48a857873a8bb8ee83a4658cbcf058a60d40081f088566
4
- data.tar.gz: c951b2d9a6e2fa9877b87da3fb648bbcd1adb9f1fac23996335d435aa0822a73
3
+ metadata.gz: 8ce2b9e1859837e95d718e90c04edf4ef48df4530dffdcb9f2c48aec68582443
4
+ data.tar.gz: 48d94f4183b292b365dbf4eb637309ddce6b15266cd1d34ea7ed46928e30198e
5
5
  SHA512:
6
- metadata.gz: 7f70fa661966bfee20ad47816cb0013fa116bb496bb7684cfb180310e948bdb430b4b4279dde1d5a2bfec13fc337f7c11b4d66d8505ab5f78a5f79c48ea1c87f
7
- data.tar.gz: e40637bc164f3b9ecd6928f5169203fafac15741dba032665a39deda4b4b48a4589fb7a429a6d4eeefa39f31f6ef967d79b0673dd4b4692185447e460c60c970
6
+ metadata.gz: 29f60464feb3b2f52ed15167cad8bb9c7cb92a496cd7e6d5b427dd5333bdad15eb77b27a48114dd478aa29c645648a507ef03c481302b36a361a90204f5d3b3f
7
+ data.tar.gz: 0ab6d7446bb1b65e01604cecc457fd98fa85bb8e510d036a197f1463619a9ff94fe44cc4f0868f29528fa03e243f7578762fea58931f21a523aba8705e05af04
checksums.yaml.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,15 @@
1
+ === 5.21.2 / 2024-01-17
2
+
3
+ * 1 bug fix:
4
+
5
+ * Fixed bug in Minitest::Compress#compress formatting w/ nested patterns. Now recurses properly.
6
+
7
+ === 5.21.1 / 2024-01-11
8
+
9
+ * 1 bug fix:
10
+
11
+ * Rails' default backtrace filter can't currently work with caller_locations, so reverting back to caller.
12
+
1
13
  === 5.21.0 / 2024-01-11
2
14
 
3
15
  * 10 minor enhancements:
@@ -199,8 +199,8 @@ module Minitest
199
199
  end
200
200
 
201
201
  def _where # :nodoc:
202
- where = Minitest.filter_backtrace(caller_locations).first
203
- [where.path, where.lineno].join ":"
202
+ where = Minitest.filter_backtrace(caller).first
203
+ where = where.split(/:in /, 2).first # clean up noise
204
204
  end
205
205
 
206
206
  E = "" # :nodoc:
@@ -64,18 +64,31 @@ module Minitest
64
64
 
65
65
  ary = min.flat_map { |(n, lines)|
66
66
  if n > 1 then
67
+ [[n, compress(lines)]] # [o1 [2 s1] [2 s2]]
68
+ else
69
+ lines
70
+ end
71
+ }
72
+ end
73
+
74
+ format = ->(lines) {
75
+ lines.flat_map { |line|
76
+ case line
77
+ when Array then
78
+ n, lines = line
79
+ lines = format[lines]
67
80
  [
68
81
  " +->> #{n} cycles of #{lines.size} lines:",
69
82
  *lines.map { |s| " | #{s}" },
70
83
  " +-<<",
71
84
  ]
72
85
  else
73
- lines
86
+ line
74
87
  end
75
88
  }
76
- end
89
+ }
77
90
 
78
- ary
91
+ format[ary]
79
92
  end
80
93
  end
81
94
  end
data/lib/minitest/spec.rb CHANGED
@@ -13,8 +13,8 @@ class Module # :nodoc:
13
13
  # warn "%-22p -> %p %p" % [meth, new_name, dont_flip]
14
14
  self.class_eval <<-EOM, __FILE__, __LINE__ + 1
15
15
  def #{new_name} *args
16
- where = Minitest.filter_backtrace(caller_locations).first
17
- where = [where.path, where.lineno].join ":"
16
+ where = Minitest.filter_backtrace(caller).first
17
+ where = where.split(/:in /, 2).first # clean up noise
18
18
  Kernel.warn "DEPRECATED: global use of #{new_name} from #\{where}. Use #{target_obj}.#{new_name} instead. This will fail in Minitest 6."
19
19
  Minitest::Expectation.new(self, Minitest::Spec.current).#{new_name}(*args)
20
20
  end
data/lib/minitest.rb CHANGED
@@ -9,7 +9,7 @@ require_relative "minitest/compress"
9
9
  # :include: README.rdoc
10
10
 
11
11
  module Minitest
12
- VERSION = "5.21.0" # :nodoc:
12
+ VERSION = "5.21.2" # :nodoc:
13
13
 
14
14
  @@installed_at_exit ||= false
15
15
  @@after_run = []
@@ -1359,8 +1359,6 @@ class TestUnexpectedError < Minitest::Test
1359
1359
  end
1360
1360
 
1361
1361
  def test_absurd_patterns
1362
- skip "NOOOO!!! but I don't care enough right now."
1363
-
1364
1362
  assert_compress <<~EXP, %w[ a b c b c a b c b c a b c ]
1365
1363
  +->> 2 cycles of 5 lines:
1366
1364
  | a
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.21.0
4
+ version: 5.21.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -29,7 +29,7 @@ cert_chain:
29
29
  S7043fq9EbQdBr2AXdj92+CDwuTfHI6/Hj5FVBDULufrJaan4xUgL70Hvc6pTTeW
30
30
  deKfBjgVAq7EYHu1AczzlUly
31
31
  -----END CERTIFICATE-----
32
- date: 2024-01-11 00:00:00.000000000 Z
32
+ date: 2024-01-18 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rdoc
@@ -57,14 +57,14 @@ dependencies:
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '4.1'
60
+ version: '4.2'
61
61
  type: :development
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '4.1'
67
+ version: '4.2'
68
68
  description: |-
69
69
  minitest provides a complete suite of testing facilities supporting
70
70
  TDD, BDD, mocking, and benchmarking.
metadata.gz.sig CHANGED
Binary file