minitest-hooks 1.5.1 → 1.5.3

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: a525a80546faf2287ec0c0b8f5423a93bf76195381aec4bb37ab04ea6a533a71
4
- data.tar.gz: 8e6c6bd1f68db59ad2a6c885f6aba06b38f0302c8ecda20981381fd9e6683550
3
+ metadata.gz: 373843f53e329c5f7d3678b58f46179d4206620dbf71060b53c844fcc286d9ae
4
+ data.tar.gz: f122d6fc10bde3c4bed3b7712c46214d6a24a5d69bebc508fc86962bb3006cdd
5
5
  SHA512:
6
- metadata.gz: c6ba36dfb0477f1a7a15579b791ee73c6a5f3bf56157a115f7eaa14c40763e5244e2eb3e6f774fbfdc0cdbc6a7f31a8595bd95a59042889e974acb45c3210c9e
7
- data.tar.gz: e56c3ed65969f299e59030a590a207a56519180843221a55635c6db58fd8dd5f9b0d339af7cfecfcfee10ec1272b2353349d89048df06f25f99680b49cbeaf87
6
+ metadata.gz: dd8e13d13357dad8b7908c92e5e8e4abf2eb878afee9759ebdd0cd49a48ebc1b023fc84a55d7caca03a8dd9670ee5ebfaef9e98c2b79c4925e701ea08ef82701
7
+ data.tar.gz: 4eccd8d59563adb207675a9d35c56ff13abfa5882e5b037372b2b6d2b8c595610cfa96bb29a5540c46a9c339301b8f71d5fabdb8ffa2e324d8f934d259e632e7
data/CHANGELOG CHANGED
@@ -1,3 +1,11 @@
1
+ === 1.5.3 (2025-12-18)
2
+
3
+ * Work correctly on minitest 6+ (jeremyevans)
4
+
5
+ === 1.5.2 (2024-08-14)
6
+
7
+ * Fix use with minitest 5.25+ (paracycle) (#27, #28)
8
+
1
9
  === 1.5.1 (2023-07-27)
2
10
 
3
11
  * Do not include specs or Rakefile in the gem (jeremyevans)
data/README.rdoc CHANGED
@@ -184,7 +184,7 @@ context of an instance of the subclass, before executing the subclass's specs.
184
184
  == Order of Operations
185
185
 
186
186
  For each spec class, the around(:all) hooks are run first. Both before(:all) and after(:all)
187
- run inside around(:all). For each spec inside the spec the spec class, around will be called,
187
+ run inside around(:all). For each spec inside the spec class, around will be called,
188
188
  and before and after for each spec will be run inside around.
189
189
 
190
190
  = License
@@ -58,14 +58,25 @@ module Minitest::Hooks::ClassMethods
58
58
  instance
59
59
  end
60
60
 
61
+ # :nocov:
62
+ if Minitest::VERSION >= '6'
63
+ # :nocov:
64
+ def run_suite(reporter, options = {})
65
+ @_minitest_hooks_reporter = reporter
66
+ super
67
+ end
68
+ end
69
+
61
70
  # When running the specs in the class, first create a singleton instance, the singleton is
62
71
  # used to implement around_all/before_all/after_all hooks, and each spec will run as a
63
72
  # dup of the singleton instance.
64
- def with_info_handler(reporter, &block)
73
+ def with_info_handler(*args, &block)
65
74
  @instance = new(NEW)
66
75
  @instance.time = 0
67
76
  @instance.name = "around_all"
68
-
77
+
78
+ reporter = args[0] || @_minitest_hooks_reporter # Minitest 6+
79
+
69
80
  begin
70
81
  @instance.around_all do
71
82
  begin
@@ -78,7 +89,7 @@ module Minitest::Hooks::ClassMethods
78
89
  failed = true
79
90
  _record_minitest_hooks_error(reporter, @instance)
80
91
  else
81
- super(reporter, &block)
92
+ super
82
93
  end
83
94
  ensure
84
95
  @instance.capture_exceptions do
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-hooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-07-27 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: minitest
@@ -89,9 +88,9 @@ email: code@jeremyevans.net
89
88
  executables: []
90
89
  extensions: []
91
90
  extra_rdoc_files:
92
- - README.rdoc
93
91
  - CHANGELOG
94
92
  - MIT-LICENSE
93
+ - README.rdoc
95
94
  files:
96
95
  - CHANGELOG
97
96
  - MIT-LICENSE
@@ -102,8 +101,11 @@ files:
102
101
  homepage: http://github.com/jeremyevans/minitest-hooks
103
102
  licenses:
104
103
  - MIT
105
- metadata: {}
106
- post_install_message:
104
+ metadata:
105
+ bug_tracker_uri: https://github.com/jeremyevans/minitest-hooks/issues
106
+ changelog_uri: https://github.com/jeremyevans/minitest-hooks/blob/master/CHANGELOG
107
+ mailing_list_uri: https://github.com/jeremyevans/minitest-hooks/discussions
108
+ source_code_uri: https://github.com/jeremyevans/minitest-hooks
107
109
  rdoc_options:
108
110
  - "--quiet"
109
111
  - "--line-numbers"
@@ -118,15 +120,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
120
  requirements:
119
121
  - - ">="
120
122
  - !ruby/object:Gem::Version
121
- version: '0'
123
+ version: '1.8'
122
124
  required_rubygems_version: !ruby/object:Gem::Requirement
123
125
  requirements:
124
126
  - - ">="
125
127
  - !ruby/object:Gem::Version
126
128
  version: '0'
127
129
  requirements: []
128
- rubygems_version: 3.4.10
129
- signing_key:
130
+ rubygems_version: 3.6.9
130
131
  specification_version: 4
131
132
  summary: Around and before_all/after_all/around_all hooks for Minitest
132
133
  test_files: []