minitest 5.14.1 → 5.14.4

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: 7ed38adcad085c6c7c1cb81e9b580908d0b5b1b3696ad0014485b6524c20e344
4
- data.tar.gz: c3574e199c963262186d5c865f248570194b1614ab4fcba13e5dfa8a2419785c
3
+ metadata.gz: 1edfa85bfac65503ab66f88d6ca07571a6e788bfd9eb513399cc60ffeae32e1f
4
+ data.tar.gz: 68a4cc4fcf8b54f8ba97dbda48e7ee4a8f818c67a3c4021920d5c6e4dfe9866c
5
5
  SHA512:
6
- metadata.gz: 543a116cf39777334557ecae8d76768afcb860995555945295669a68c20c9268543112368f65c848081ff0ab2ca727a87590676c3cadf1bc87bebc5986f08e92
7
- data.tar.gz: b23ea10b6259ad60c96dbd3a384e8d39dcac48d3f961a26b3aa6e910ed947e6fc2d4b36fb06e8e84667457a6d897e3dca855771c0c6c3bfb81b38d3d83c1b3af
6
+ metadata.gz: 7f808ea45c7d6755da784bc6d70356f6beb7b794bd4df3cf509ce08d762f125c1bcafd92c406c73ea6a13809d836c75812fed83605f18b1d82e6f16b98e97004
7
+ data.tar.gz: d75f3b41034e4a70b8f372a79af5971eb2a589f87a4a80bfc20f23ebf1e5ac50235bfa5c300a25bba99f55746a8148cddde804cc9181d941ad62c71626482e06
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,21 @@
1
+ === 5.14.4 / 2021-02-23
2
+
3
+ * 1 bug fix:
4
+
5
+ * Fixed deprecation warning using stub with methods using keyword arguments. (Nakilon)
6
+
7
+ === 5.14.3 / 2021-01-05
8
+
9
+ * 1 bug fix:
10
+
11
+ * Bumped require_ruby_version to < 4 (trunk = 3.1).
12
+
13
+ === 5.14.2 / 2020-08-31
14
+
15
+ * 1 bug fix:
16
+
17
+ * Bumped ruby version to include 3.0 (trunk).
18
+
1
19
  === 5.14.1 / 2020-05-15
2
20
 
3
21
  * 3 minor enhancements:
@@ -205,7 +223,7 @@
205
223
  * 2 bug fixes:
206
224
 
207
225
  * Re-release to refresh gem certificate signing. ugh.
208
- * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
226
+ * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
209
227
 
210
228
  === 5.9.0 / 2016-05-16
211
229
 
@@ -229,7 +247,7 @@
229
247
  * 2 bug fixes:
230
248
 
231
249
  * Re-release to refresh gem certificate signing. ugh.
232
- * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
250
+ * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
233
251
 
234
252
  === 5.8.4 / 2016-01-21
235
253
 
@@ -1389,4 +1407,3 @@ back.
1389
1407
  * 1 major enhancement
1390
1408
 
1391
1409
  * Birthday!
1392
-
data/README.rdoc CHANGED
@@ -376,6 +376,42 @@ Using our example above, here is how we might implement MyCI:
376
376
 
377
377
  == FAQ
378
378
 
379
+ === What versions are compatible with what? Or what versions are supported?
380
+
381
+ Minitest is a dependency of rails, which until fairly recently had an
382
+ overzealous backwards compatibility policy. As such, I'm stuck
383
+ supporting versions of ruby that are long past EOL. Once rails 5.2 is
384
+ dropped (hopefully April 2021), I get to drop a bunch of versions of
385
+ ruby that I have to currently test against.
386
+
387
+ (As of 2021-01-31)
388
+
389
+ Current versions of rails: (https://endoflife.date/rails)
390
+
391
+ | rails | min ruby | rec ruby | minitest | status |
392
+ |-------+----------+----------+----------+----------|
393
+ | 7.0 | >= 2.7 | 3.0 | >= 5.1 | Future |
394
+ | 6.1 | >= 2.5 | 3.0 | >= 5.1 | Current |
395
+ | 6.0 | >= 2.5 | 2.6 | >= 5.1 | Security |
396
+ | 5.2 | >= 2.2.2 | 2.5 | ~> 5.1 | Security | EOL @railsconf 2021?
397
+
398
+ Current versions of ruby: (https://endoflife.date/ruby)
399
+
400
+ | ruby | Status | EOL Date |
401
+ |------+---------+------------|
402
+ | 3.0 | Current | 2024-03-31 |
403
+ | 2.7 | Maint | 2023-03-31 |
404
+ | 2.6 | Maint | 2022-03-31 |
405
+ | 2.5 | Maint* | 2021-03-31 |
406
+ | 2.4 | EOL | 2020-03-31 |
407
+ | 2.3 | EOL | 2019-03-31 |
408
+ | 2.2 | EOL | 2018-03-31 |
409
+
410
+ See also:
411
+
412
+ * https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
413
+ * https://jamesjeffersconsulting.com/ruby-rails-version-matrix/
414
+
379
415
  === How to test SimpleDelegates?
380
416
 
381
417
  The following implementation and test:
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ Hoe.spec "minitest" do
11
11
 
12
12
  license "MIT"
13
13
 
14
- require_ruby_version "~> 2.2"
14
+ require_ruby_version [">= 2.2", "< 4.0"]
15
15
  end
16
16
 
17
17
  desc "Find missing expectations"
data/lib/minitest.rb CHANGED
@@ -8,7 +8,7 @@ require "stringio"
8
8
  # :include: README.rdoc
9
9
 
10
10
  module Minitest
11
- VERSION = "5.14.1" # :nodoc:
11
+ VERSION = "5.14.4" # :nodoc:
12
12
  ENCS = "".respond_to? :encoding # :nodoc:
13
13
 
14
14
  @@installed_at_exit ||= false
data/lib/minitest/mock.rb CHANGED
@@ -207,7 +207,9 @@ class Object
207
207
  # assert obj_under_test.stale?
208
208
  # end
209
209
  # end
210
- #
210
+ #--
211
+ # NOTE: keyword args in callables are NOT checked for correctness
212
+ # against the existing method. Too many edge cases to be worth it.
211
213
 
212
214
  def stub name, val_or_callable, *block_args
213
215
  new_name = "__minitest_stub__#{name}"
@@ -231,6 +233,8 @@ class Object
231
233
  end
232
234
  end
233
235
 
236
+ metaclass.send(:ruby2_keywords, name) if metaclass.respond_to?(:ruby2_keywords, true)
237
+
234
238
  yield self
235
239
  ensure
236
240
  metaclass.send :undef_method, name
@@ -1118,16 +1118,20 @@ class TestMinitestAssertions < Minitest::Test
1118
1118
  end
1119
1119
  end
1120
1120
 
1121
+ def assert_fail_after t
1122
+ @tc.fail_after t.year, t.month, t.day, "remove the deprecations"
1123
+ end
1124
+
1121
1125
  def test_fail_after
1122
- t = Time.now
1123
- y, m, d = t.year, t.month, t.day
1126
+ d0 = Time.now
1127
+ d1 = d0 + 86_400 # I am an idiot
1124
1128
 
1125
1129
  assert_silent do
1126
- @tc.fail_after y, m, d+1, "remove the deprecations"
1130
+ assert_fail_after d1
1127
1131
  end
1128
1132
 
1129
1133
  assert_triggered "remove the deprecations" do
1130
- @tc.fail_after y, m, d, "remove the deprecations"
1134
+ assert_fail_after d0
1131
1135
  end
1132
1136
  end
1133
1137
 
@@ -1342,18 +1346,22 @@ class TestMinitestAssertions < Minitest::Test
1342
1346
  end
1343
1347
  end
1344
1348
 
1349
+ def assert_skip_until t, msg
1350
+ @tc.skip_until t.year, t.month, t.day, msg
1351
+ end
1352
+
1345
1353
  def test_skip_until
1346
1354
  @assertion_count = 0
1347
1355
 
1348
- t = Time.now
1349
- y, m, d = t.year, t.month, t.day
1356
+ d0 = Time.now
1357
+ d1 = d0 + 86_400 # I am an idiot
1350
1358
 
1351
1359
  assert_output "", /Stale skip_until \"not yet\" at .*?:\d+$/ do
1352
- @tc.skip_until y, m, d, "not yet"
1360
+ assert_skip_until d0, "not yet"
1353
1361
  end
1354
1362
 
1355
1363
  assert_triggered "not ready yet", Minitest::Skip do
1356
- @tc.skip_until y, m, d+1, "not ready yet"
1364
+ assert_skip_until d1, "not ready yet"
1357
1365
  end
1358
1366
  end
1359
1367
 
@@ -591,6 +591,18 @@ class TestMinitestStub < Minitest::Test
591
591
  end
592
592
  end
593
593
 
594
+ class Keywords
595
+ def self.args req, kw1:, kw2:24
596
+ [req, kw1, kw2]
597
+ end
598
+ end
599
+
600
+ def test_stub_callable_keyword_args
601
+ Keywords.stub :args, ->(*args, **kws) { [args, kws] } do
602
+ @tc.assert_equal [["woot"], { kw1: 42 }], Keywords.args("woot", kw1: 42)
603
+ end
604
+ end
605
+
594
606
  def test_stub_callable_block_5 # from tenderlove
595
607
  @assertion_count += 1
596
608
  Foo.stub5 :blocking, Bar.new do
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.14.1
4
+ version: 5.14.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBBDANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBBTANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTE5MTIxMzAwMDIwNFoXDTIwMTIxMjAwMDIwNFowRTETMBEGA1UE
15
+ GRYDY29tMB4XDTIwMTIyMjIwMzgzMFoXDTIxMTIyMjIwMzgzMFowRTETMBEGA1UE
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
- AQCkkcHqAa6IKLYGl93rn78J3L+LnqyxaA059n4IGMHWN5bv9KBQnIjOrpLadtYZ
26
- vhWkunWDKdfVapBEq5+T4HzqnsEXC3aCv6JEKJY6Zw7iSzl0M8hozuzRr+w46wvT
27
- fV2yTN6QTVxqbMsJJyjosks4ZdQYov2zdvQpt1HsLi+Qmckmg8SPZsd+T8uiiBCf
28
- b+1ORSM5eEfBQenPXy83LZcoQz8i6zVB4aAfTGGdhxjoMGUEmSZ6xpkOzmnGa9QK
29
- m5x9IDiApM+vCELNwDXXGNFEnQBBK+wAe4Pek8o1V1TTOxL1kGPewVOitX1p3xoN
30
- h7iEjga8iM1LbZUfiISZ+WrB
25
+ AQAE3XRm1YZcCVjAJy5yMZvTOFrS7B2SYErc+0QwmKYbHztTTDY2m5Bii+jhpuxh
26
+ H+ETcU1z8TUKLpsBUP4kUpIRowkVN1p/jKapV8T3Rbwq+VuYFe+GMKsf8wGZSecG
27
+ oMQ8DzzauZfbvhe2kDg7G9BBPU0wLQlY25rDcCy9bLnD7R0UK3ONqpwvsI5I7x5X
28
+ ZIMXR0a9/DG+55mawwdGzCQobDKiSNLK89KK7OcNTALKU0DfgdTkktdgKchzKHqZ
29
+ d/AHw/kcnU6iuMUoJEcGiJd4gVCTn1l3cDcIvxakGslCA88Jubw0Sqatan0TnC9g
30
+ KToW560QIey7SPfHWduzFJnV
31
31
  -----END CERTIFICATE-----
32
- date: 2020-05-16 00:00:00.000000000 Z
32
+ date: 2021-02-24 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rdoc
@@ -161,7 +161,7 @@ licenses:
161
161
  metadata:
162
162
  homepage_uri: https://github.com/seattlerb/minitest
163
163
  bug_tracker_uri: https://github.com/seattlerb/minitest/issues
164
- post_install_message:
164
+ post_install_message:
165
165
  rdoc_options:
166
166
  - "--main"
167
167
  - README.rdoc
@@ -169,17 +169,20 @@ require_paths:
169
169
  - lib
170
170
  required_ruby_version: !ruby/object:Gem::Requirement
171
171
  requirements:
172
- - - "~>"
172
+ - - ">="
173
173
  - !ruby/object:Gem::Version
174
174
  version: '2.2'
175
+ - - "<"
176
+ - !ruby/object:Gem::Version
177
+ version: '4.0'
175
178
  required_rubygems_version: !ruby/object:Gem::Requirement
176
179
  requirements:
177
180
  - - ">="
178
181
  - !ruby/object:Gem::Version
179
182
  version: '0'
180
183
  requirements: []
181
- rubygems_version: 3.0.3
182
- signing_key:
184
+ rubygems_version: 3.1.4
185
+ signing_key:
183
186
  specification_version: 4
184
187
  summary: minitest provides a complete suite of testing facilities supporting TDD,
185
188
  BDD, mocking, and benchmarking
metadata.gz.sig CHANGED
Binary file