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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.rdoc +6 -0
- data/README.rdoc +36 -0
- data/lib/minitest.rb +1 -1
- data/lib/minitest/mock.rb +5 -1
- data/test/minitest/test_minitest_mock.rb +12 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1edfa85bfac65503ab66f88d6ca07571a6e788bfd9eb513399cc60ffeae32e1f
|
4
|
+
data.tar.gz: 68a4cc4fcf8b54f8ba97dbda48e7ee4a8f818c67a3c4021920d5c6e4dfe9866c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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
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.
|
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-
|
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
|