1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
Description: Changes for compatibility with Minitest 6
Author: Simon Quigley <tsimonq2@debian.org>
Origin: vendor
Last-Update: 2026-02-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/lib/rantly/minitest_extensions.rb
+++ b/lib/rantly/minitest_extensions.rb
@@ -1,14 +1,8 @@
require 'minitest'
require 'rantly/property'
-require "minitest/unit" unless defined?(MiniTest)
+require "minitest/autorun"
-test_class = if defined?(MiniTest::Test)
- MiniTest::Test
- else
- MiniTest::Unit::TestCase
- end
-
-test_class.class_eval do
+Minitest::Test.class_eval do
def property_of(&blk)
Rantly::Property.new(blk)
end
--- a/test/shrinks_test.rb
+++ b/test/shrinks_test.rb
@@ -93,7 +93,7 @@ describe 'Shrinker Test' do
a[i] = 1
a
end
- assert_raises MiniTest::Assertion do
+ assert_raises Minitest::Assertion do
test.check do |a|
assert(a.array.none?(&:positive?) && a.length < 4, 'contains 1')
end
|