minitest 5.19.0 → 5.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90d1006243ab84a197a234948e0256bba3cbecbfb1d5d62d55b44ed5422d7eed
4
- data.tar.gz: 2b526508669eab5c8578c2075fe8a8a83f1434a609c09667888020142e9326b7
3
+ metadata.gz: 667a803a272949e7b05440f91a56155ea3977a5b9d364542801889c5a2fe0ff0
4
+ data.tar.gz: 862bf0ff3d24eea4bbe6c7f435ceef19aaa97748f6a87ec3fa51dc218ca79298
5
5
  SHA512:
6
- metadata.gz: 6614896f10af7da66d1327f6ba5e0565458df8567d5687dddf02ee91dc3ece9332d7ffb706c9a3b093deaaec13f8ddf8f017d5f90ba8d18975bb6ebcb8a313d0
7
- data.tar.gz: eff4fefb8a32661c3e0fdf80a7b3c4cfc81f6e9dcd160a40aef3e49e6d82cf1c5b6bff92fc0faaf8dab6334049c11f54e18d95a745c82e8aecfb3533ed7b3194
6
+ metadata.gz: 2284c84ae5f98a3454e9a95417e609ca1a8ef9af8ee8b1fad8f2aca2632fde6a309e266ef1d399d9a7d47337cdcba696500a1b36f1fa7d952615eb390a89e329
7
+ data.tar.gz: a76204f74c2caf693a4302065815b871863ae655372d25fc4d41e416b0d4935704c1e1068457b5cda934312e3915ae8a27595ca962c98e544dd45b54cac2aef7
checksums.yaml.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ === 5.20.0 / 2023-09-06
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Optionally allow autorun exit hook to remain active in forked child. (casperisfine)
6
+
1
7
  === 5.19.0 / 2023-07-26
2
8
 
3
9
  * 2 minor enhancements:
data/lib/minitest.rb CHANGED
@@ -9,7 +9,7 @@ require "etc"
9
9
  # :include: README.rdoc
10
10
 
11
11
  module Minitest
12
- VERSION = "5.19.0" # :nodoc:
12
+ VERSION = "5.20.0" # :nodoc:
13
13
 
14
14
  @@installed_at_exit ||= false
15
15
  @@after_run = []
@@ -60,6 +60,9 @@ module Minitest
60
60
  cattr_accessor :info_signal
61
61
  self.info_signal = "INFO"
62
62
 
63
+ cattr_accessor :allow_fork
64
+ self.allow_fork = false
65
+
63
66
  ##
64
67
  # Registers Minitest to run at process exit
65
68
 
@@ -75,7 +78,7 @@ module Minitest
75
78
 
76
79
  pid = Process.pid
77
80
  at_exit {
78
- next if Process.pid != pid
81
+ next if !Minitest.allow_fork && Process.pid != pid
79
82
  @@after_run.reverse_each(&:call)
80
83
  exit exit_code || false
81
84
  }
@@ -1089,17 +1089,27 @@ class TestMinitestUnitTestCase < Minitest::Test
1089
1089
 
1090
1090
  def test_autorun_does_not_affect_fork_success_status
1091
1091
  @assertion_count = 0
1092
- skip "windows doesn't have skip" unless Process.respond_to?(:fork)
1092
+ skip "windows doesn't have fork" unless Process.respond_to?(:fork)
1093
1093
  Process.waitpid(fork {})
1094
1094
  assert_equal true, $?.success?
1095
1095
  end
1096
1096
 
1097
1097
  def test_autorun_does_not_affect_fork_exit_status
1098
1098
  @assertion_count = 0
1099
- skip "windows doesn't have skip" unless Process.respond_to?(:fork)
1099
+ skip "windows doesn't have fork" unless Process.respond_to?(:fork)
1100
1100
  Process.waitpid(fork { exit 42 })
1101
1101
  assert_equal 42, $?.exitstatus
1102
1102
  end
1103
+
1104
+ def test_autorun_optionally_can_affect_fork_exit_status
1105
+ @assertion_count = 0
1106
+ skip "windows doesn't have fork" unless Process.respond_to?(:fork)
1107
+ Minitest.allow_fork = true
1108
+ Process.waitpid(fork { exit 42 })
1109
+ refute_equal 42, $?.exitstatus
1110
+ ensure
1111
+ Minitest.allow_fork = false
1112
+ end
1103
1113
  end
1104
1114
 
1105
1115
  class TestMinitestGuard < Minitest::Test
data.tar.gz.sig CHANGED
@@ -1 +1,4 @@
1
- �Vuq���Y��΢�5�A� Q��������_�K/������.�S��wi,U��z3���G�0c0h��@X�q��r1� 5z�eL�J-o��s�SQ��V�� �i[ K����|��~���l��c���=ژo�oMg�K�q��; ���\���I�yI0���O�h(x��c=\�J�t�Ev� ��iC��'ѫ���-��k�%�J�`���n;����p�?����I\b����3\�O�)�)ӑwF���
1
+ ^�bG�@�����Ąw��nr��:@�
2
+ ���Q���%�`d�[M�S7#�N�Ǟ,sVn=5��ݕ��0+E$��0���K�Kn80br�
3
+ �ʜ�}�� ���m�O��i
4
+ ��=
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.19.0
4
+ version: 5.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -29,7 +29,7 @@ cert_chain:
29
29
  ROfWo9Uyp8ba/j9eVG14KkYRaLydAY1MNQk2yd3R5CGfeOpD1kttxjoypoUJ2dOG
30
30
  nsNBRuQJ1UfiCG97a6DNm+Fr
31
31
  -----END CERTIFICATE-----
32
- date: 2023-07-26 00:00:00.000000000 Z
32
+ date: 2023-09-06 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rdoc
metadata.gz.sig CHANGED
Binary file