minitest 5.14.3 → 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: f47836e4dcf290018441ccd338ab779507b9ad318c5815f7c6df427d5d519fd4
4
- data.tar.gz: 29aeac653e8eb3e2d0962e6bfd29794ae88290e63820e827a8f92bb395a778b7
3
+ metadata.gz: 1edfa85bfac65503ab66f88d6ca07571a6e788bfd9eb513399cc60ffeae32e1f
4
+ data.tar.gz: 68a4cc4fcf8b54f8ba97dbda48e7ee4a8f818c67a3c4021920d5c6e4dfe9866c
5
5
  SHA512:
6
- metadata.gz: b2f2c7e8f0a5b3c3ea3f8e87b68f69ff5294dc1e40c453308660a97ae8e072cd2426e853a5c84638b5d2f3d57bc744d6df98f9a659adad9ca13b233d401565b0
7
- data.tar.gz: 13a28eebea4de744d08bb6ac3538cde8fe1817167cf48e2a5cfc5bc76d0a4584953f6e5b98d4bb15285630d92aae000093368ab309a3e5a80a8cb02117c6ba15
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,9 @@
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
+
1
7
  === 5.14.3 / 2021-01-05
2
8
 
3
9
  * 1 bug fix:
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/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.3" # :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
@@ -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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.14.3
4
+ version: 5.14.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -29,7 +29,7 @@ cert_chain:
29
29
  d/AHw/kcnU6iuMUoJEcGiJd4gVCTn1l3cDcIvxakGslCA88Jubw0Sqatan0TnC9g
30
30
  KToW560QIey7SPfHWduzFJnV
31
31
  -----END CERTIFICATE-----
32
- date: 2021-01-06 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
metadata.gz.sig CHANGED
Binary file