minitest 5.10.3 → 5.15.0

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
- SHA1:
3
- metadata.gz: 32d4df1397bf8fc366b4b18555936d7c92853121
4
- data.tar.gz: 4000474506d5056f3117b1a93e1bc4019dfd15af
2
+ SHA256:
3
+ metadata.gz: 0d7d16c7decb91ba01a888704bd527d1e5569454b444fe1b4e41a8a3a7db7406
4
+ data.tar.gz: 1ee0d2823a94b63b8cd019198fe2ca20a5c3d9d7bf4918148bdfa543fb65945d
5
5
  SHA512:
6
- metadata.gz: 195277b6093c3650634809f445c274d8df6bfafb4f32be448f4cdde07de9edf47c64e4f05cdf3572bf79f61e2597ce33c2b7821cd147d4c8bd2f251451e86098
7
- data.tar.gz: a8a16930df76274303310ba4faf115914913bea38b559ec4edfad8ae2a835fb22e7d6308c88eadf93044ea422b334d65e33c8c59f15f0ece27a962b1fc8d7e9c
6
+ metadata.gz: 933a300969aa30dc8f254952dd17f9975cb1f3aad9c10c96260394d088b76900273773374b5ed72731356f2b7f1cfeb131583ae943322250a60401e554e11f45
7
+ data.tar.gz: 24a356e1d3c06e28d03860b4dca92d17b88979ebad6316fe97298207c58b29b0ae207657d0044a43ede1bf9a27ac43ca8c779e24fc9ca5ed4c920beca2eaf143
checksums.yaml.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,193 @@
1
+ === 5.15.0 / 2021-12-14
2
+
3
+ * 1 major enhancement:
4
+
5
+ * assert_throws returns the value returned, if any. (volmer)
6
+
7
+ * 3 minor enhancements:
8
+
9
+ * Added -S <CODES> option to skip reporting of certain types of output
10
+ * Enable Ruby deprecation warnings by default. (casperisfine)
11
+ * Use Etc.nprocessors by default in order to maximize cpu usage. (tonytonyjan)
12
+
13
+ * 6 bug fixes:
14
+
15
+ * Close then unlink tempfiles on Windows. (nobu)
16
+ * Fixed #skip_until for windows paths. (MSP-Greg)
17
+ * Fixed a bunch of tests for jruby and windows. (MSP-Greg)
18
+ * Fixed marshalling of specs if they error. (tenderlove, jeremyevans, et al)
19
+ * Updated deprecation message for block expectations. (blowmage)
20
+ * Use Kernel.warn directly in expectations in case CUT defines their own warn. (firien)
21
+
22
+ === 5.14.4 / 2021-02-23
23
+
24
+ * 1 bug fix:
25
+
26
+ * Fixed deprecation warning using stub with methods using keyword arguments. (Nakilon)
27
+
28
+ === 5.14.3 / 2021-01-05
29
+
30
+ * 1 bug fix:
31
+
32
+ * Bumped require_ruby_version to < 4 (trunk = 3.1).
33
+
34
+ === 5.14.2 / 2020-08-31
35
+
36
+ * 1 bug fix:
37
+
38
+ * Bumped ruby version to include 3.0 (trunk).
39
+
40
+ === 5.14.1 / 2020-05-15
41
+
42
+ * 3 minor enhancements:
43
+
44
+ * Minitest.filter_backtrace returns original backtrace if filter comes back empty.
45
+ * Minitest::BacktraceFilter now returns entire backtrace if $MT_DEBUG set in env.
46
+ * Return true on a successful refute. (jusleg)
47
+
48
+ * 1 bug fix:
49
+
50
+ * Fixed expectation doco to not use global expectations.
51
+
52
+ === 5.14.0 / 2020-01-11
53
+
54
+ * 2 minor enhancements:
55
+
56
+ * Block-assertions (eg assert_output) now error if raised inside the block. (casperisfine)
57
+ * Changed assert_raises to only catch Assertion since that covers Skip and friends.
58
+
59
+ * 3 bug fixes:
60
+
61
+ * Added example for value wrapper with block to Expectations module. (stomar)
62
+ * Fixed use of must/wont_be_within_delta on Expectation instance. (stomar)
63
+ * Renamed UnexpectedError#exception to #error to avoid problems with reraising. (casperisfine)
64
+
65
+ === 5.13.0 / 2019-10-29
66
+
67
+ * 9 minor enhancements:
68
+
69
+ * Added Minitest::Guard#osx?
70
+ * Added examples to documentation for assert_raises. (lxxxvi)
71
+ * Added expectations #path_must_exist and #path_wont_exist. Not thrilled with the names.
72
+ * Added fail_after(year, month, day, msg) to allow time-bombing after a deadline.
73
+ * Added skip_until(year, month, day, msg) to allow deferring until a deadline.
74
+ * Deprecated Minitest::Guard#maglev?
75
+ * Deprecated Minitest::Guard#rubinius?
76
+ * Finally added assert_path_exists and refute_path_exists. (deivid-rodriguez)
77
+ * Refactored and pulled Assertions#things_to_diff out of #diff. (BurdetteLamar)
78
+
79
+ * 3 bug fixes:
80
+
81
+ * Fix autorun bug that affects fork exit status in tests. (dylanahsmith/jhawthorn)
82
+ * Improved documentation for _/value/expect, especially for blocks. (svoop)
83
+ * Support new Proc#to_s format. (ko1)
84
+
85
+ === 5.12.2 / 2019-09-28
86
+
87
+ * 1 bug fix:
88
+
89
+ * After chatting w/ @y-yagi and others, decided to lower support to include ruby 2.2.
90
+
91
+ === 5.12.1 / 2019-09-28
92
+
93
+ * 1 minor enhancement:
94
+
95
+ * Added documentation for Reporter classes. (sshaw)
96
+
97
+ * 3 bug fixes:
98
+
99
+ * Avoid using 'match?' to support older ruby versions. (y-yagi)
100
+ * Fixed broken link to reference on goodness-of-fit testing. (havenwood)
101
+ * Update requirements in readme and Rakefile/hoe spec.
102
+
103
+ === 5.12.0 / 2019-09-22
104
+
105
+ * 8 minor enhancements:
106
+
107
+ * Added a descriptive error if assert_output or assert_raises called without a block. (okuramasafumi)
108
+ * Changed mu_pp_for_diff to make having both \n and \\n easier to debug.
109
+ * Deprecated $N for specifying number of parallel test runners. Use MT_CPU.
110
+ * Deprecated use of global expectations. To be removed from MT6.
111
+ * Extended Assertions#mu_pp to encoding validity output for strings to improve diffs.
112
+ * Extended Assertions#mu_pp to output encoding and validity if invalid to improve diffs.
113
+ * Extended Assertions#mu_pp_for_diff to make escaped newlines more obvious in diffs.
114
+ * Fail gracefully when expectation used outside of `it`.
115
+
116
+ * 3 bug fixes:
117
+
118
+ * Check `option[:filter]` klass before match. Fixes 2.6 warning. (y-yagi)
119
+ * Fixed Assertions#diff from recalculating if set to nil
120
+ * Fixed spec section of readme to not use deprecated global expectations. (CheezItMan)
121
+
122
+ === 5.11.3 / 2018-01-26
123
+
124
+ * 1 bug fix:
125
+
126
+ * Pushed #error? up to Reportable module. (composerinteralia)
127
+
128
+ === 5.11.2 / 2018-01-25
129
+
130
+ * 1 minor enhancement:
131
+
132
+ * Reversed Test < Result. Back to < Runnable and using Reportable for shared code.
133
+
134
+ * 2 bug fixes:
135
+
136
+ * Fixed Result#location for instances of Test. (alexisbernard)
137
+ * Fixed deprecation message for Runnable#marshal_dump. (y-yagi)
138
+
139
+ === 5.11.1 / 2018-01-02
140
+
141
+ * 1 bug fix:
142
+
143
+ * Fixed Result (a superclass of Test) overriding Runnable's name accessors. (y-yagi, MSP-Greg)
144
+
145
+ === 5.11.0 / 2018-01-01
146
+
147
+ * 2 major enhancements:
148
+
149
+ * Added Minitest::Result and Minitest::Result.from(runnable).
150
+ * Changed Minitest::Test to subclass Result and refactored methods up.
151
+
152
+ * 7 minor enhancements:
153
+
154
+ * Added --no-plugins and MT_NO_PLUGINS to bypass MT plugin autoloading. Helps with bad actors installed globally.
155
+ * Added bench_performance_{logarithmic,power} for spec-style benchmarks. (rickhull)
156
+ * Added deprecation warning for Runnable#marshal_dump.
157
+ * Minitest.run_one_method now checks for instance of Result, not exact same class.
158
+ * Minitest::Test.run returns a Result version of self, not self.
159
+ * ProgressReporter#prerecord now explicitly prints klass.name. Allows for fakers.
160
+
161
+ * 4 bug fixes:
162
+
163
+ * Object.stub no longer calls the passed block if stubbed with a callable.
164
+ * Object.stub now passes blocks down to the callable result.
165
+ * Pushed Minitest::Test#time & #time_it up to Runnable.
166
+ * Test nil equality directly in assert_equal. Fixes #679. (voxik)
167
+
168
+ === 5.11.0b1 / 2017-12-20
169
+
170
+ * 2 major enhancements:
171
+
172
+ * Added Minitest::Result and Minitest::Result.from(runnable).
173
+ * Changed Minitest::Test to subclass Result and refactored methods up.
174
+
175
+ * 6 minor enhancements:
176
+
177
+ * Added --no-plugins and MT_NO_PLUGINS to bypass MT plugin autoloading. Helps with bad actors installed globally.
178
+ * Added bench_performance_{logarithmic,power} for spec-style benchmarks. (rickhull)
179
+ * Minitest.run_one_method now checks for instance of Result, not exact same class.
180
+ * Minitest::Test.run returns a Result version of self, not self.
181
+ * ProgressReporter#prerecord now explicitly prints klass.name. Allows for fakers.
182
+ * Removed Runnable.marshal_dump/load.
183
+
184
+ * 4 bug fixes:
185
+
186
+ * Object.stub no longer calls the passed block if stubbed with a callable.
187
+ * Object.stub now passes blocks down to the callable result.
188
+ * Pushed Minitest::Test#time & #time_it up to Runnable.
189
+ * Test nil equality directly in assert_equal. Fixes #679. (voxik)
190
+
1
191
  === 5.10.3 / 2017-07-21
2
192
 
3
193
  * 1 minor enhancement:
@@ -54,7 +244,7 @@
54
244
  * 2 bug fixes:
55
245
 
56
246
  * Re-release to refresh gem certificate signing. ugh.
57
- * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
247
+ * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
58
248
 
59
249
  === 5.9.0 / 2016-05-16
60
250
 
@@ -78,7 +268,7 @@
78
268
  * 2 bug fixes:
79
269
 
80
270
  * Re-release to refresh gem certificate signing. ugh.
81
- * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
271
+ * Fixed hoe/minitest to not augment load path if we're actually testing minitest.
82
272
 
83
273
  === 5.8.4 / 2016-01-21
84
274
 
@@ -392,7 +582,7 @@ Minitest 5:
392
582
  * Added Minitest::Benchmark.
393
583
  * Your benchmarks need to move to their own subclass.
394
584
  * Benchmarks using the spec DSL have to have "Bench" somewhere in their describe.
395
- * MiniTest::Unit.after_tests moved to Minitest.after_tests
585
+ * MiniTest::Unit.after_tests moved to Minitest.after_run
396
586
  * MiniTest::Unit.autorun is now Minitest.autorun. Just require minitest/autorun pls.
397
587
  * Removed ParallelEach#grep since it isn't used anywhere.
398
588
  * Renamed Runnable#__name__ to Runnable#name (but uses @NAME internally).
@@ -1238,4 +1428,3 @@ back.
1238
1428
  * 1 major enhancement
1239
1429
 
1240
1430
  * Birthday!
1241
-
data/Manifest.txt CHANGED
@@ -19,6 +19,7 @@ lib/minitest/spec.rb
19
19
  lib/minitest/test.rb
20
20
  lib/minitest/unit.rb
21
21
  test/minitest/metametameta.rb
22
+ test/minitest/test_minitest_assertions.rb
22
23
  test/minitest/test_minitest_benchmark.rb
23
24
  test/minitest/test_minitest_mock.rb
24
25
  test/minitest/test_minitest_reporter.rb
data/README.rdoc CHANGED
@@ -126,13 +126,13 @@ Define your tests as methods beginning with +test_+.
126
126
 
127
127
  describe "when asked about cheeseburgers" do
128
128
  it "must respond positively" do
129
- @meme.i_can_has_cheezburger?.must_equal "OHAI!"
129
+ _(@meme.i_can_has_cheezburger?).must_equal "OHAI!"
130
130
  end
131
131
  end
132
132
 
133
133
  describe "when asked about blending possibilities" do
134
134
  it "won't say no" do
135
- @meme.will_it_blend?.wont_match /^no/i
135
+ _(@meme.will_it_blend?).wont_match /^no/i
136
136
  end
137
137
  end
138
138
  end
@@ -220,9 +220,9 @@ verification to ensure they got all the calls they were expecting."
220
220
  end
221
221
  end
222
222
 
223
- **Multi-threading and Mocks**
223
+ ==== Multi-threading and Mocks
224
224
 
225
- Minitest mocks do not support multi-threading if it works, fine, if it doesn't
225
+ Minitest mocks do not support multi-threading. If it works, fine, if it doesn't
226
226
  you can use regular ruby patterns and facilities like local variables. Here's
227
227
  an example of asserting that code inside a thread is run:
228
228
 
@@ -294,6 +294,18 @@ provided via plugins. To see them, simply run with +--help+:
294
294
  -p, --pride Pride. Show your testing pride!
295
295
  -a, --autotest Connect to autotest server.
296
296
 
297
+ You can set up a rake task to run all your tests by adding this to your Rakefile:
298
+
299
+ require "rake/testtask"
300
+
301
+ Rake::TestTask.new(:test) do |t|
302
+ t.libs << "test"
303
+ t.libs << "lib"
304
+ t.test_files = FileList["test/**/test_*.rb"]
305
+ end
306
+
307
+ task :default => :test
308
+
297
309
  == Writing Extensions
298
310
 
299
311
  To define a plugin, add a file named minitest/XXX_plugin.rb to your
@@ -364,6 +376,42 @@ Using our example above, here is how we might implement MyCI:
364
376
 
365
377
  == FAQ
366
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 | EOL | 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
+
367
415
  === How to test SimpleDelegates?
368
416
 
369
417
  The following implementation and test:
@@ -379,7 +427,7 @@ The following implementation and test:
379
427
  end
380
428
 
381
429
  it "must respond to work" do
382
- @worker.must_respond_to :work
430
+ _(@worker).must_respond_to :work
383
431
  end
384
432
  end
385
433
 
@@ -434,11 +482,26 @@ you want to extend your test using setup/teardown via a module, just
434
482
  make sure you ALWAYS call super. before/after automatically call super
435
483
  for you, so make sure you don't do it twice.
436
484
 
485
+ === How to run code before a group of tests?
486
+
487
+ Use a constant with begin...end like this:
488
+
489
+ describe Blah do
490
+ SETUP = begin
491
+ # ... this runs once when describe Blah starts
492
+ end
493
+ # ...
494
+ end
495
+
496
+ This can be useful for expensive initializations or sharing state.
497
+ Remember, this is just ruby code, so you need to make sure this
498
+ technique and sharing state doesn't interfere with your tests.
499
+
437
500
  === Why am I seeing <tt>uninitialized constant MiniTest::Test (NameError)</tt>?
438
501
 
439
- Are you running the test with Bundler (e.g. via <tt>bundle exec</tt> )? If so,
502
+ Are you running the test with Bundler (e.g. via <tt>bundle exec</tt> )? If so,
440
503
  in order to require minitest, you must first add the <tt>gem 'minitest'</tt>
441
- to your Gemfile and run +bundle+. Once it's installed, you should be
504
+ to your Gemfile and run +bundle+. Once it's installed, you should be
442
505
  able to require minitest and run your tests.
443
506
 
444
507
  == Prominent Projects using Minitest:
@@ -454,6 +517,8 @@ able to require minitest and run your tests.
454
517
 
455
518
  == Developing Minitest:
456
519
 
520
+ Minitest requires {Hoe}[https://rubygems.org/gems/hoe].
521
+
457
522
  === Minitest's own tests require UTF-8 external encoding.
458
523
 
459
524
  This is a common problem in Windows, where the default external Encoding is
@@ -506,7 +571,7 @@ If you see failures like either of these, you are probably missing diff tool:
506
571
 
507
572
 
508
573
  If you use Cygwin or MSYS2 or similar there are packages that include a
509
- GNU diff for Widnows. If you don't, you can download GNU diffutils from
574
+ GNU diff for Windows. If you don't, you can download GNU diffutils from
510
575
  http://gnuwin32.sourceforge.net/packages/diffutils.htm
511
576
  (make sure to add it to your PATH).
512
577
 
@@ -532,6 +597,7 @@ minispec-metadata :: Metadata for describe/it blocks & CLI tag filter.
532
597
  E.g. <tt>it "requires JS driver", js: true do</tt> &
533
598
  <tt>ruby test.rb --tag js</tt> runs tests tagged :js.
534
599
  minispec-rails :: Minimal support to use Spec style in Rails 5+.
600
+ mini-apivore :: for swagger based automated API testing.
535
601
  minitest-around :: Around block for minitest. An alternative to
536
602
  setup/teardown dance.
537
603
  minitest-assert_errors :: Adds Minitest assertions to test for errors raised
@@ -574,12 +640,14 @@ minitest-firemock :: Makes your Minitest mocks more resilient.
574
640
  minitest-focus :: Focus on one test at a time.
575
641
  minitest-gcstats :: A minitest plugin that adds a report of the top
576
642
  tests by number of objects allocated.
643
+ minitest-global_expectations:: Support minitest expectation methods for all objects
577
644
  minitest-great_expectations :: Generally useful additions to minitest's
578
645
  assertions and expectations.
579
646
  minitest-growl :: Test notifier for minitest via growl.
580
647
  minitest-happy :: GLOBALLY ACTIVATE MINITEST PRIDE! RAWR!
581
- minitest-have_tag :: Adds Minitest assertions to test for the existence of
648
+ minitest-have_tag :: Adds Minitest assertions to test for the existence of
582
649
  HTML tags, including contents, within a provided string.
650
+ minitest-heat :: Reporting that builds a heat map of failure locations
583
651
  minitest-hooks :: Around and before_all/after_all/around_all hooks
584
652
  minitest-hyper :: Pretty, single-page HTML reports for your Minitest runs
585
653
  minitest-implicit-subject :: Implicit declaration of the test subject.
@@ -588,6 +656,7 @@ minitest-instrument :: Instrument ActiveSupport::Notifications when
588
656
  minitest-instrument-db :: Store information about speed of test execution
589
657
  provided by minitest-instrument in database.
590
658
  minitest-junit :: JUnit-style XML reporter for minitest.
659
+ minitest-keyword :: Use Minitest assertions with keyword arguments.
591
660
  minitest-libnotify :: Test notifier for minitest via libnotify.
592
661
  minitest-line :: Run test at line number.
593
662
  minitest-logger :: Define assert_log and enable minitest to test log messages.
@@ -599,6 +668,7 @@ minitest-matchers :: Adds support for RSpec-style matchers to
599
668
  minitest-matchers_vaccine :: Adds assertions that adhere to the matcher spec,
600
669
  but without any expectation infections.
601
670
  minitest-metadata :: Annotate tests with metadata (key-value).
671
+ minitest-mock_expectations :: Provides method call assertions for minitest.
602
672
  minitest-mongoid :: Mongoid assertion matchers for Minitest.
603
673
  minitest-must_not :: Provides must_not as an alias for wont in
604
674
  Minitest.
@@ -614,10 +684,10 @@ minitest-rails-capybara :: Capybara integration for Minitest::Rails.
614
684
  minitest-reporters :: Create customizable Minitest output formats.
615
685
  minitest-rg :: Colored red/green output for Minitest.
616
686
  minitest-rspec_mocks :: Use RSpec Mocks with Minitest.
617
- minitest-server :: minitest-server provides a client/server setup
618
- with your minitest process, allowing your test
687
+ minitest-server :: minitest-server provides a client/server setup
688
+ with your minitest process, allowing your test
619
689
  run to send its results directly to a handler.
620
- minitest-sequel :: Minitest assertions to speed-up development and
690
+ minitest-sequel :: Minitest assertions to speed-up development and
621
691
  testing of Ruby Sequel database setups.
622
692
  minitest-shared_description :: Support for shared specs and shared spec
623
693
  subclasses
@@ -644,12 +714,16 @@ minitest-unordered :: Adds a new assertion to minitest for checking the
644
714
  contents of a collection, ignoring element order.
645
715
  minitest-vcr :: Automatic cassette managment with Minitest::Spec
646
716
  and VCR.
717
+ minitest_log :: Adds structured logging, data explication, and verdicts.
647
718
  minitest_owrapper :: Get tests results as a TestResult object.
648
719
  minitest_should :: Shoulda style syntax for minitest test::unit.
649
720
  minitest_tu_shim :: Bridges between test/unit and minitest.
650
721
  mongoid-minitest :: Minitest matchers for Mongoid.
722
+ mutant-minitest :: Minitest integration for mutant.
651
723
  pry-rescue :: A pry plugin w/ minitest support. See
652
724
  pry-rescue/minitest.rb.
725
+ rematch :: Declutter your test files from large hardcoded data
726
+ and update them automatically when your code changes.
653
727
  rspec2minitest :: Easily translate any RSpec matchers to Minitest
654
728
  assertions and expectations.
655
729
 
@@ -681,8 +755,7 @@ Authors... Please send me a pull request with a description of your minitest ext
681
755
 
682
756
  == REQUIREMENTS:
683
757
 
684
- * Ruby 1.8.7+. No magic is involved. I hope.
685
- * NOTE: 1.8 and 1.9 will be dropped in minitest 6+.
758
+ * Ruby 2.3+. No magic is involved. I hope.
686
759
 
687
760
  == INSTALL:
688
761
 
data/Rakefile CHANGED
@@ -11,21 +11,7 @@ Hoe.spec "minitest" do
11
11
 
12
12
  license "MIT"
13
13
 
14
- ## TODO: uncomment this on the last point release on 5.x
15
- #
16
- # self.post_install_message = <<-"EOM"
17
- # NOTE: minitest 5 will be the last in the minitest family to support
18
- # ruby 1.8 and 1.9 (and maybe 2.0?). If you need to keep using 1.8
19
- # or 1.9, you need to pin your dependency to minitest with
20
- # something like "~> 5.0".
21
- #
22
- # Further, minitest 6 will be dropping the following:
23
- #
24
- # + MiniTest (it's been Minitest for *years*)
25
- # + MiniTest::Unit
26
- # + MiniTest::Unit::TestCase
27
- # + assert_send (unless you argue for it well)
28
- # EOM
14
+ require_ruby_version [">= 2.2", "< 4.0"]
29
15
  end
30
16
 
31
17
  desc "Find missing expectations"
@@ -35,7 +21,7 @@ task :specs do
35
21
  require "minitest/spec"
36
22
 
37
23
  pos_prefix, neg_prefix = "must", "wont"
38
- skip_re = /^(must|wont)$|wont_(throw)|must_(block|not?_|nothing|raise$)/x
24
+ skip_re = /^(must|wont)$|wont_(throw)|must_(block|not?_|nothing|send|raise$)/x
39
25
  dont_flip_re = /(must|wont)_(include|respond_to)/
40
26
 
41
27
  map = {
@@ -46,6 +32,8 @@ task :specs do
46
32
  /_includes/ => "_include",
47
33
  /(must|wont)_(.*_of|nil|silent|empty)/ => '\1_be_\2',
48
34
  /must_raises/ => "must_raise",
35
+ /(must|wont)_predicate/ => '\1_be',
36
+ /(must|wont)_path_exists/ => 'path_\1_exist',
49
37
  }
50
38
 
51
39
  expectations = Minitest::Expectations.public_instance_methods.map(&:to_s)
data/lib/hoe/minitest.rb CHANGED
@@ -24,9 +24,5 @@ module Hoe::Minitest
24
24
 
25
25
  def define_minitest_tasks
26
26
  self.testlib = :minitest
27
-
28
- # make sure we use the gemmed minitest on 1.9
29
- self.test_prelude = 'gem "minitest"' unless
30
- minitest? or ENV["MT_NO_ISOLATE"]
31
27
  end
32
28
  end