minitest 5.25.5 → 6.0.2
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +144 -0
- data/Manifest.txt +13 -4
- data/README.rdoc +21 -100
- data/Rakefile +10 -2
- data/bin/minitest +5 -0
- data/design_rationale.rb +21 -19
- data/lib/hoe/minitest.rb +2 -1
- data/lib/minitest/assertions.rb +37 -74
- data/lib/minitest/autorun.rb +3 -4
- data/lib/minitest/benchmark.rb +3 -3
- data/lib/minitest/bisect.rb +304 -0
- data/lib/minitest/complete.rb +56 -0
- data/lib/minitest/find_minimal_combination.rb +127 -0
- data/lib/minitest/hell.rb +1 -1
- data/lib/minitest/manual_plugins.rb +4 -16
- data/lib/minitest/parallel.rb +5 -3
- data/lib/minitest/path_expander.rb +432 -0
- data/lib/minitest/pride.rb +2 -2
- data/lib/minitest/pride_plugin.rb +1 -1
- data/lib/minitest/server.rb +49 -0
- data/lib/minitest/server_plugin.rb +88 -0
- data/lib/minitest/spec.rb +11 -37
- data/lib/minitest/sprint.rb +105 -0
- data/lib/minitest/sprint_plugin.rb +39 -0
- data/lib/minitest/test.rb +8 -13
- data/lib/minitest/test_task.rb +44 -20
- data/lib/minitest.rb +104 -107
- data/test/minitest/metametameta.rb +1 -1
- data/test/minitest/test_bisect.rb +249 -0
- data/test/minitest/test_find_minimal_combination.rb +138 -0
- data/test/minitest/test_minitest_assertions.rb +51 -108
- data/test/minitest/test_minitest_benchmark.rb +14 -0
- data/test/minitest/test_minitest_reporter.rb +6 -5
- data/test/minitest/test_minitest_spec.rb +60 -128
- data/test/minitest/test_minitest_test.rb +22 -101
- data/test/minitest/test_path_expander.rb +229 -0
- data/test/minitest/test_server.rb +146 -0
- data.tar.gz.sig +0 -0
- metadata +92 -33
- metadata.gz.sig +0 -0
- data/.autotest +0 -34
- data/lib/minitest/mock.rb +0 -347
- data/lib/minitest/unit.rb +0 -42
- data/test/minitest/test_minitest_mock.rb +0 -1218
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a04ee24255c32c51840a0fcbcb8bf06f9032843e7c754f4c0acb6d99a95a0fff
|
|
4
|
+
data.tar.gz: 11522e8f24357e0317496ab945f26e6bbaf8809870827bbd8816f227a343bdd4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 125017c3555d465f5a2bf997f6cd4d9efc6c9decf9a7e97d205db7bda8e7b9697e20b1f77898c97d30fa20efe8ed6a01ca229cd128bfeeadde8136661e60ad12
|
|
7
|
+
data.tar.gz: d11a937d873af9c33b03f0da272e0f4bad92b8fb88472e569a95a41a5589d6fbc16ae3143b6394be37dd510e2381f76d9b3f7c5b00a615b2cb339655603f2f70
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/History.rdoc
CHANGED
|
@@ -1,3 +1,147 @@
|
|
|
1
|
+
=== 6.0.2 / 2026-02-23
|
|
2
|
+
|
|
3
|
+
* 7 bug fixes:
|
|
4
|
+
|
|
5
|
+
* Added missing drb dependency from minitest-server. (y-yagi)
|
|
6
|
+
* Cleaned up bisect's sub-commands to load files directly, not ruby+require.
|
|
7
|
+
* Fixed bisect to use same cmd ($0) to run tests as original invocation.
|
|
8
|
+
* load server_plugin if server is loaded. (y-yagi)
|
|
9
|
+
* Manipulate local args instead of ARGV in Sprint.run.
|
|
10
|
+
* Only show --bisect in usage if using minitest.
|
|
11
|
+
* Remove -Itest:lib from bisect's rb_flags since bin/minitest adds them.
|
|
12
|
+
|
|
13
|
+
=== 6.0.1 / 2025-12-26
|
|
14
|
+
|
|
15
|
+
* 1 minor enhancement:
|
|
16
|
+
|
|
17
|
+
* Added new rake task `test:fu` to Minitest::TestTask, to only run
|
|
18
|
+
tests with FU (focused units?) in their name. This should mostly
|
|
19
|
+
obviate the need for the minitest-focus plugin.
|
|
20
|
+
|
|
21
|
+
* 5 bug fixes:
|
|
22
|
+
|
|
23
|
+
* Fixed --help and --version exiting 1. (grosser)
|
|
24
|
+
* Fixed method signature of Minitest::Benchmark.run. (flavorjones)
|
|
25
|
+
* Flush stdout/stderr before exit./bin/minitest -Ilib ./bug1046.rb:1 < /dev/null (grosser)
|
|
26
|
+
* Improved usage banner output by reordering and reformatting.
|
|
27
|
+
* Normalize paths while processing file.rb:line args.
|
|
28
|
+
|
|
29
|
+
=== 6.0.0 / 2025-12-17
|
|
30
|
+
|
|
31
|
+
This is a major release. Read this.
|
|
32
|
+
|
|
33
|
+
Please give feedback here: https://github.com/minitest/minitest/issues/1040
|
|
34
|
+
|
|
35
|
+
Oh god... here we go... (again)
|
|
36
|
+
|
|
37
|
+
* 8 deaths in the family(!!):
|
|
38
|
+
|
|
39
|
+
* Deleted MiniTest and MiniTest::Unit::TestCase compatibility namespaces.
|
|
40
|
+
* Deleted all use of Marshal for serialization.
|
|
41
|
+
* Deleted maglev? and rubinius? guard methods. LOL.
|
|
42
|
+
* Deleted all minitest/spec expectations from Object. Use _/value/expect.
|
|
43
|
+
* Dropped minitest/mock.rb. This has been extracted to the minitest-mock gem.
|
|
44
|
+
* assert_equal(nil, value) no longer allowed. Use assert_nil to be explicit.
|
|
45
|
+
* Removed assert_send. Use assert_predicate or assert_operator.
|
|
46
|
+
* Removed Minitest::Test#class_name.
|
|
47
|
+
|
|
48
|
+
* 7 major (oft incompatible) changes:
|
|
49
|
+
|
|
50
|
+
* Big: Major refactored MT6's run path!
|
|
51
|
+
* Minitest.__run -> Minitest.run_all_suites
|
|
52
|
+
* Runnable.run -> Runnable.run_suite & Runnable.filter_runnable_methods
|
|
53
|
+
* Runnable.run_one_method -> Runnable.run
|
|
54
|
+
* Removed Minitest.run_one_method (might bring it back to raise?)
|
|
55
|
+
* Removed deprecated <tt>ENV["N"]</tt> to specify number of parallel tests. Use MT_CPU.
|
|
56
|
+
* Renamed +options[:filter]+ to +options[:include]+, added <tt>--include</tt> cmdline option.
|
|
57
|
+
* <tt>--name</tt> is still handled, but that will be removed in the future.
|
|
58
|
+
* Renamed Minitest::Runnable#test_order to #run_order.
|
|
59
|
+
* If #message is passed a proc then that proc overrides all other output.
|
|
60
|
+
* They are no longer chained!
|
|
61
|
+
* And it does less for formatting of your output.
|
|
62
|
+
* Removed reporter arg from with_info_handler as it has never(?) been used. (HACK?)
|
|
63
|
+
* Plugin loading is now opt-in!
|
|
64
|
+
* Require the plugin in your test_helper.
|
|
65
|
+
* Or use Minitest.load :x
|
|
66
|
+
* Or call Minitest.load_plugins for the old autoloading behavior.
|
|
67
|
+
|
|
68
|
+
* 5 additions:
|
|
69
|
+
|
|
70
|
+
* Added minitest-sprint's minitest cmdline, now with line support!
|
|
71
|
+
* Added minitest-bisect. Run with minitest --bisect or -b.
|
|
72
|
+
* Added minitest-server.
|
|
73
|
+
* Added minitest/complete to help with shell's tab-completion of tests.
|
|
74
|
+
* Vendored latest version of path_expander.
|
|
75
|
+
|
|
76
|
+
* 5 other:
|
|
77
|
+
|
|
78
|
+
* Bumped to ruby 3.2+.
|
|
79
|
+
* Removed obsolete conditional for CompositeReporter#prerecord.
|
|
80
|
+
* Removed obsolete version guards around Minitest::Result in reporters.
|
|
81
|
+
* assert_operator and assert_predicate both call assert_respond_to first.
|
|
82
|
+
* Assertions reuse themselves a lot more. Bumps assertion count in some places.
|
|
83
|
+
|
|
84
|
+
=== 5.27.0 / 2025-12-11
|
|
85
|
+
|
|
86
|
+
* 1 major enhancement:
|
|
87
|
+
|
|
88
|
+
* Adding post install message announcing the EOL for minitest 5!
|
|
89
|
+
|
|
90
|
+
* 2 minor enhancements:
|
|
91
|
+
|
|
92
|
+
* Removed TestTask::Work#initialize since Queue can now initialize with an Enumerable! AMAZING!
|
|
93
|
+
* Use Kernel#warn uplevel argument for nicer warnings. (byroot)
|
|
94
|
+
|
|
95
|
+
* 5 bug fixes:
|
|
96
|
+
|
|
97
|
+
* Cleaned up option aliasing a tad.
|
|
98
|
+
* Removed obsolete conditional for prerecord
|
|
99
|
+
* Removed obsolete guards around Warning.
|
|
100
|
+
* Removed obsolete version guards for pattern matching assertions.
|
|
101
|
+
* Switched all internal requires to require_relative.
|
|
102
|
+
|
|
103
|
+
=== 5.26.2 / 2025-11-17
|
|
104
|
+
|
|
105
|
+
* 5 bug fixes:
|
|
106
|
+
|
|
107
|
+
* Bumped minimum ruby to 3.1.
|
|
108
|
+
* Alias Spec#name to #inspect for cleaner output in repls.
|
|
109
|
+
* Fix pathing for Hoe::Minitest initialization to be more generic.
|
|
110
|
+
* Fixed refute_in_epsilon to use min of abs values. (wtn)
|
|
111
|
+
* Improved options processing and usage output to be more clear.
|
|
112
|
+
|
|
113
|
+
=== 5.26.1 / 2025-11-08
|
|
114
|
+
|
|
115
|
+
The Ocean Shores, Slightly Less Tipsy Edition!
|
|
116
|
+
|
|
117
|
+
* 3 bug fixes:
|
|
118
|
+
|
|
119
|
+
* Add links to API doco in README.
|
|
120
|
+
* Add missing require thread.
|
|
121
|
+
* Bumped ruby version to include 4.0 (trunk). (hsbt)
|
|
122
|
+
(see also 5.14.2)
|
|
123
|
+
|
|
124
|
+
=== 5.26.0 / 2025-10-07
|
|
125
|
+
|
|
126
|
+
The Seattle.rb Nerd Party, Slightly Tipsy Edition!
|
|
127
|
+
|
|
128
|
+
* 2 minor enhancements:
|
|
129
|
+
|
|
130
|
+
* Added extra documentation to Minitest::TestTask options.
|
|
131
|
+
* Make parallelize_me! a no-op when n_threads=1.
|
|
132
|
+
|
|
133
|
+
* 9 bug fixes:
|
|
134
|
+
|
|
135
|
+
* Bypass parallel_executor entirely when n_threads=1.
|
|
136
|
+
* Don't require rubygems in Rakefile... it is 2025.
|
|
137
|
+
* Ensure that minitest exits non-zero on Interrupt. (tavianator)
|
|
138
|
+
* Fix Minitest.run sequence rdoc to include loop vars and read consistently.
|
|
139
|
+
* Fix call to parallel_executor.shutdown when it isn't defined.
|
|
140
|
+
* Removed some 1.8/1.9-based code from the assertions and expectations.
|
|
141
|
+
* Still fighting with rdoc? Yup. Still fighting with rdoc...
|
|
142
|
+
* Switched assert_equal's diff from Tempfile.open to Tempfile.create.
|
|
143
|
+
* Use Regexp.escape for BASE_RE in case pwd has special chars. (astra_1993)
|
|
144
|
+
|
|
1
145
|
=== 5.25.5 / 2025-03-12
|
|
2
146
|
|
|
3
147
|
* 4 bug fixes:
|
data/Manifest.txt
CHANGED
|
@@ -1,32 +1,41 @@
|
|
|
1
|
-
.autotest
|
|
2
1
|
History.rdoc
|
|
3
2
|
Manifest.txt
|
|
4
3
|
README.rdoc
|
|
5
4
|
Rakefile
|
|
5
|
+
bin/minitest
|
|
6
6
|
design_rationale.rb
|
|
7
7
|
lib/hoe/minitest.rb
|
|
8
8
|
lib/minitest.rb
|
|
9
9
|
lib/minitest/assertions.rb
|
|
10
10
|
lib/minitest/autorun.rb
|
|
11
11
|
lib/minitest/benchmark.rb
|
|
12
|
+
lib/minitest/bisect.rb
|
|
13
|
+
lib/minitest/complete.rb
|
|
12
14
|
lib/minitest/compress.rb
|
|
13
15
|
lib/minitest/error_on_warning.rb
|
|
14
16
|
lib/minitest/expectations.rb
|
|
17
|
+
lib/minitest/find_minimal_combination.rb
|
|
15
18
|
lib/minitest/hell.rb
|
|
16
19
|
lib/minitest/manual_plugins.rb
|
|
17
|
-
lib/minitest/mock.rb
|
|
18
20
|
lib/minitest/parallel.rb
|
|
21
|
+
lib/minitest/path_expander.rb
|
|
19
22
|
lib/minitest/pride.rb
|
|
20
23
|
lib/minitest/pride_plugin.rb
|
|
24
|
+
lib/minitest/server.rb
|
|
25
|
+
lib/minitest/server_plugin.rb
|
|
21
26
|
lib/minitest/spec.rb
|
|
27
|
+
lib/minitest/sprint.rb
|
|
28
|
+
lib/minitest/sprint_plugin.rb
|
|
22
29
|
lib/minitest/test.rb
|
|
23
30
|
lib/minitest/test_task.rb
|
|
24
|
-
lib/minitest/unit.rb
|
|
25
31
|
test/minitest/metametameta.rb
|
|
32
|
+
test/minitest/test_bisect.rb
|
|
33
|
+
test/minitest/test_find_minimal_combination.rb
|
|
26
34
|
test/minitest/test_minitest_assertions.rb
|
|
27
35
|
test/minitest/test_minitest_benchmark.rb
|
|
28
|
-
test/minitest/test_minitest_mock.rb
|
|
29
36
|
test/minitest/test_minitest_reporter.rb
|
|
30
37
|
test/minitest/test_minitest_spec.rb
|
|
31
38
|
test/minitest/test_minitest_test.rb
|
|
32
39
|
test/minitest/test_minitest_test_task.rb
|
|
40
|
+
test/minitest/test_path_expander.rb
|
|
41
|
+
test/minitest/test_server.rb
|
data/README.rdoc
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
= minitest/{test,spec,
|
|
1
|
+
= minitest/{test,spec,benchmark}
|
|
2
2
|
|
|
3
|
-
home :: https://
|
|
3
|
+
home :: https://minite.st/
|
|
4
|
+
code :: https://github.com/minitest/minitest
|
|
4
5
|
bugs :: https://github.com/minitest/minitest/issues
|
|
5
6
|
rdoc :: https://docs.seattlerb.org/minitest
|
|
6
7
|
clog :: https://github.com/minitest/minitest/blob/master/History.rdoc
|
|
7
|
-
vim :: https://github.com/sunaku/vim-ruby-minitest
|
|
8
8
|
emacs:: https://github.com/arthurnn/minitest-emacs
|
|
9
|
+
vim :: https://github.com/vim-test/vim-test
|
|
9
10
|
|
|
10
11
|
== DESCRIPTION:
|
|
11
12
|
|
|
12
13
|
minitest provides a complete suite of testing facilities supporting
|
|
13
|
-
TDD, BDD,
|
|
14
|
+
TDD, BDD, and benchmarking.
|
|
14
15
|
|
|
15
16
|
"I had a class with Jim Weirich on testing last week and we were
|
|
16
17
|
allowed to choose our testing frameworks. Kirk Haines and I were
|
|
@@ -36,9 +37,6 @@ algorithms in a repeatable manner. Now you can assert that your newb
|
|
|
36
37
|
co-worker doesn't replace your linear algorithm with an exponential
|
|
37
38
|
one!
|
|
38
39
|
|
|
39
|
-
minitest/mock by Steven Baker, is a beautifully tiny mock (and stub)
|
|
40
|
-
object framework.
|
|
41
|
-
|
|
42
40
|
minitest/pride shows pride in testing and adds coloring to your test
|
|
43
41
|
output. I guess it is an example of how to write IO pipes too. :P
|
|
44
42
|
|
|
@@ -68,7 +66,6 @@ extract-method refactorings still apply.
|
|
|
68
66
|
* minitest/autorun - the easy and explicit way to run all your tests.
|
|
69
67
|
* minitest/test - a very fast, simple, and clean test system.
|
|
70
68
|
* minitest/spec - a very fast, simple, and clean spec system.
|
|
71
|
-
* minitest/mock - a simple and clean mock/stub system.
|
|
72
69
|
* minitest/benchmark - an awesome way to assert your algorithm's performance.
|
|
73
70
|
* minitest/pride - show your pride in testing!
|
|
74
71
|
* minitest/test_task - a full-featured and clean rake task generator.
|
|
@@ -95,7 +92,9 @@ Given that you'd like to test the following class:
|
|
|
95
92
|
|
|
96
93
|
=== Unit tests
|
|
97
94
|
|
|
98
|
-
Define your tests as methods beginning with +test_+.
|
|
95
|
+
Define your tests as methods beginning with +test_+. Use
|
|
96
|
+
{assertions}[/minitest/Minitest/Assertions.html] to test for results
|
|
97
|
+
or state.
|
|
99
98
|
|
|
100
99
|
require "minitest/autorun"
|
|
101
100
|
|
|
@@ -119,6 +118,9 @@ Define your tests as methods beginning with +test_+.
|
|
|
119
118
|
|
|
120
119
|
=== Specs
|
|
121
120
|
|
|
121
|
+
Use {expectations}[/minitest/Minitest/Expectations.html] to check
|
|
122
|
+
results or state. They must be wrapped in a value call (eg +_+).
|
|
123
|
+
|
|
122
124
|
require "minitest/autorun"
|
|
123
125
|
|
|
124
126
|
describe Meme do
|
|
@@ -146,7 +148,7 @@ For matchers support check out:
|
|
|
146
148
|
|
|
147
149
|
=== Benchmarks
|
|
148
150
|
|
|
149
|
-
Add benchmarks to your tests.
|
|
151
|
+
Add {benchmarks}[/minitest/Minitest/Benchmark.html] to your tests.
|
|
150
152
|
|
|
151
153
|
# optionally run benchmarks, good for CI-only work!
|
|
152
154
|
require "minitest/benchmark" if ENV["BENCH"]
|
|
@@ -185,85 +187,6 @@ outputs something like:
|
|
|
185
187
|
|
|
186
188
|
Output is tab-delimited to make it easy to paste into a spreadsheet.
|
|
187
189
|
|
|
188
|
-
=== Mocks
|
|
189
|
-
|
|
190
|
-
Mocks and stubs defined using terminology by Fowler & Meszaros at
|
|
191
|
-
https://www.martinfowler.com/bliki/TestDouble.html:
|
|
192
|
-
|
|
193
|
-
"Mocks are pre-programmed with expectations which form a specification
|
|
194
|
-
of the calls they are expected to receive. They can throw an exception
|
|
195
|
-
if they receive a call they don't expect and are checked during
|
|
196
|
-
verification to ensure they got all the calls they were expecting."
|
|
197
|
-
|
|
198
|
-
class MemeAsker
|
|
199
|
-
def initialize(meme)
|
|
200
|
-
@meme = meme
|
|
201
|
-
end
|
|
202
|
-
|
|
203
|
-
def ask(question)
|
|
204
|
-
method = question.tr(" ", "_") + "?"
|
|
205
|
-
@meme.__send__(method)
|
|
206
|
-
end
|
|
207
|
-
end
|
|
208
|
-
|
|
209
|
-
require "minitest/autorun"
|
|
210
|
-
|
|
211
|
-
describe MemeAsker, :ask do
|
|
212
|
-
describe "when passed an unpunctuated question" do
|
|
213
|
-
it "should invoke the appropriate predicate method on the meme" do
|
|
214
|
-
@meme = Minitest::Mock.new
|
|
215
|
-
@meme_asker = MemeAsker.new @meme
|
|
216
|
-
@meme.expect :will_it_blend?, :return_value
|
|
217
|
-
|
|
218
|
-
@meme_asker.ask "will it blend"
|
|
219
|
-
|
|
220
|
-
@meme.verify
|
|
221
|
-
end
|
|
222
|
-
end
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
==== Multi-threading and Mocks
|
|
226
|
-
|
|
227
|
-
Minitest mocks do not support multi-threading. If it works, fine, if it doesn't
|
|
228
|
-
you can use regular ruby patterns and facilities like local variables. Here's
|
|
229
|
-
an example of asserting that code inside a thread is run:
|
|
230
|
-
|
|
231
|
-
def test_called_inside_thread
|
|
232
|
-
called = false
|
|
233
|
-
pr = Proc.new { called = true }
|
|
234
|
-
thread = Thread.new(&pr)
|
|
235
|
-
thread.join
|
|
236
|
-
assert called, "proc not called"
|
|
237
|
-
end
|
|
238
|
-
|
|
239
|
-
=== Stubs
|
|
240
|
-
|
|
241
|
-
Mocks and stubs are defined using terminology by Fowler & Meszaros at
|
|
242
|
-
https://www.martinfowler.com/bliki/TestDouble.html:
|
|
243
|
-
|
|
244
|
-
"Stubs provide canned answers to calls made during the test".
|
|
245
|
-
|
|
246
|
-
Minitest's stub method overrides a single method for the duration of
|
|
247
|
-
the block.
|
|
248
|
-
|
|
249
|
-
def test_stale_eh
|
|
250
|
-
obj_under_test = Something.new
|
|
251
|
-
|
|
252
|
-
refute obj_under_test.stale?
|
|
253
|
-
|
|
254
|
-
Time.stub :now, Time.at(0) do # stub goes away once the block is done
|
|
255
|
-
assert obj_under_test.stale?
|
|
256
|
-
end
|
|
257
|
-
end
|
|
258
|
-
|
|
259
|
-
A note on stubbing: In order to stub a method, the method must
|
|
260
|
-
actually exist prior to stubbing. Use a singleton method to create a
|
|
261
|
-
new non-existing method:
|
|
262
|
-
|
|
263
|
-
def obj_under_test.fake_method
|
|
264
|
-
...
|
|
265
|
-
end
|
|
266
|
-
|
|
267
190
|
=== Running Your Tests
|
|
268
191
|
|
|
269
192
|
Ideally, you'll use a rake task to run your tests (see below), either
|
|
@@ -422,13 +345,10 @@ Current versions of rails: (https://endoflife.date/rails)
|
|
|
422
345
|
|
|
423
346
|
| rails | min ruby | minitest | status | EOL Date |
|
|
424
347
|
|-------+----------+----------+----------+------------|
|
|
348
|
+
| 8.1 | >= 3.2 | >= 5.1 | Current | 2027-10-07 |
|
|
425
349
|
| 8.0 | >= 3.2 | >= 5.1 | Current | 2026-11-07 |
|
|
426
|
-
| 7.2 | >= 3.1 | >= 5.1 |
|
|
427
|
-
| 7.1 | >= 2.7 | >= 5.1 |
|
|
428
|
-
| 7.0 | >= 2.7 | >= 5.1 | Security | 2025-04-01 |
|
|
429
|
-
| 6.1 | >= 2.5 | >= 5.1 | EOL | 2024-10-01 |
|
|
430
|
-
| 6.0 | >= 2.5 | >= 5.1 | EOL | 2023-06-01 |
|
|
431
|
-
| 5.2 | >= 2.2.2 | ~> 5.1 | EOL | 2022-06-01 |
|
|
350
|
+
| 7.2 | >= 3.1 | >= 5.1 | Security | 2026-08-09 |
|
|
351
|
+
| 7.1 | >= 2.7 | >= 5.1 | EOL | 2025-10-01 |
|
|
432
352
|
|
|
433
353
|
If you want to look at the requirements for a specific version, run:
|
|
434
354
|
|
|
@@ -684,6 +604,9 @@ minitest-happy :: GLOBALLY ACTIVATE MINITEST PRIDE! RAWR!
|
|
|
684
604
|
minitest-have_tag :: Adds Minitest assertions to test for the existence of
|
|
685
605
|
HTML tags, including contents, within a provided string.
|
|
686
606
|
minitest-heat :: Reporting that builds a heat map of failure locations
|
|
607
|
+
minitest-holdify :: Stop maintaining large expected values in your
|
|
608
|
+
test/fixture files! Hold them automatically.
|
|
609
|
+
Update them effortlessly.
|
|
687
610
|
minitest-hooks :: Around and before_all/after_all/around_all hooks
|
|
688
611
|
minitest-hyper :: Pretty, single-page HTML reports for your Minitest runs
|
|
689
612
|
minitest-implicit-subject :: Implicit declaration of the test subject.
|
|
@@ -758,12 +681,10 @@ mongoid-minitest :: Minitest matchers for Mongoid.
|
|
|
758
681
|
mutant-minitest :: Minitest integration for mutant.
|
|
759
682
|
pry-rescue :: A pry plugin w/ minitest support. See
|
|
760
683
|
pry-rescue/minitest.rb.
|
|
761
|
-
rematch :: Declutter your test files from large hardcoded data
|
|
762
|
-
and update them automatically when your code changes.
|
|
763
684
|
rspec2minitest :: Easily translate any RSpec matchers to Minitest
|
|
764
685
|
assertions and expectations.
|
|
765
|
-
stubberry :: Multiple stubbing 'berries', sweet and useful
|
|
766
|
-
stub helpers and assertions. ( stub_must,
|
|
686
|
+
stubberry :: Multiple stubbing 'berries', sweet and useful
|
|
687
|
+
stub helpers and assertions. ( stub_must,
|
|
767
688
|
assert_method_called, stubbing ORM objects by id )
|
|
768
689
|
|
|
769
690
|
== Unknown Extensions:
|
|
@@ -794,7 +715,7 @@ Authors... Please send me a pull request with a description of your minitest ext
|
|
|
794
715
|
|
|
795
716
|
== REQUIREMENTS:
|
|
796
717
|
|
|
797
|
-
* Ruby 2
|
|
718
|
+
* Ruby 3.2+. No magic is involved. I hope.
|
|
798
719
|
|
|
799
720
|
== INSTALL:
|
|
800
721
|
|
data/Rakefile
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
# -*- ruby -*-
|
|
2
2
|
|
|
3
|
-
require "rubygems"
|
|
4
3
|
require "hoe"
|
|
5
4
|
$:.unshift "lib" # to pick up lib/minitest/test_task.rb when minitest not installed
|
|
6
5
|
|
|
7
6
|
Hoe.plugin :seattlerb
|
|
7
|
+
Hoe.plugin :isolate
|
|
8
8
|
Hoe.plugin :rdoc
|
|
9
|
+
Hoe.plugin :cov
|
|
9
10
|
|
|
10
11
|
Hoe.spec "minitest" do
|
|
11
12
|
developer "Ryan Davis", "ryand-ruby@zenspider.com"
|
|
12
13
|
|
|
13
14
|
license "MIT"
|
|
14
15
|
|
|
15
|
-
require_ruby_version
|
|
16
|
+
require_ruby_version ">= 3.2"
|
|
17
|
+
|
|
18
|
+
dependency "prism", "~> 1.5"
|
|
19
|
+
dependency "drb", "~> 2.0"
|
|
20
|
+
|
|
21
|
+
self.rdoc_locations << "l:/home/www/minite.st/html/docs"
|
|
22
|
+
|
|
23
|
+
self.cov_filter = %w[ tmp ]
|
|
16
24
|
end
|
|
17
25
|
|
|
18
26
|
desc "Find missing expectations"
|
data/bin/minitest
ADDED
data/design_rationale.rb
CHANGED
|
@@ -2,25 +2,27 @@
|
|
|
2
2
|
###############################################################################
|
|
3
3
|
describe Thingy do # class TestThingy < Minitest::Test
|
|
4
4
|
before do # def setup
|
|
5
|
-
do_some_setup # super
|
|
6
|
-
end # do_some_setup
|
|
7
|
-
# end
|
|
8
|
-
it "should do the first thing" do #
|
|
9
|
-
1.must_equal 1 # def test_first_thing
|
|
10
|
-
end # assert_equal 1, 1
|
|
11
|
-
# end
|
|
12
|
-
describe SubThingy do # end
|
|
13
|
-
before do #
|
|
14
|
-
do_more_setup # class TestSubThingy < TestThingy
|
|
15
|
-
end # def setup
|
|
16
5
|
# super
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
do_some_setup # do_some_setup
|
|
7
|
+
end # end
|
|
8
|
+
#
|
|
9
|
+
it "should do the first thing" do # def test_first_thing
|
|
10
|
+
_(1).must_equal 1 # assert_equal 1, 1
|
|
11
|
+
end # end
|
|
23
12
|
# end
|
|
13
|
+
#
|
|
14
|
+
describe SubThingy do # class TestSubThingy < TestThingy
|
|
15
|
+
before do # def setup
|
|
16
|
+
# super
|
|
17
|
+
do_more_setup # do_more_setup
|
|
18
|
+
end # end
|
|
19
|
+
#
|
|
20
|
+
it "should do the second thing" do # def test_second_thing
|
|
21
|
+
_(2).must_equal 2 # assert_equal 2, 2
|
|
22
|
+
end # end
|
|
23
|
+
end # end
|
|
24
|
+
end #
|
|
25
|
+
#
|
|
24
26
|
###############################################################################
|
|
25
27
|
# runs 2 specs # runs 3 tests
|
|
26
28
|
###############################################################################
|
|
@@ -33,7 +35,7 @@ class ThingySpec < Minitest::Spec
|
|
|
33
35
|
end
|
|
34
36
|
|
|
35
37
|
def test_should_do_the_first_thing
|
|
36
|
-
|
|
38
|
+
_(1).must_equal 1
|
|
37
39
|
end
|
|
38
40
|
end
|
|
39
41
|
|
|
@@ -47,6 +49,6 @@ class SubThingySpec < ThingySpec
|
|
|
47
49
|
remove_method :test_should_do_the_first_thing
|
|
48
50
|
|
|
49
51
|
def test_should_do_the_second_thing
|
|
50
|
-
|
|
52
|
+
_(2).must_equal 2
|
|
51
53
|
end
|
|
52
54
|
end
|