63 lines
2.0 KiB
Diff
63 lines
2.0 KiB
Diff
|
From a29042b0c0dbdc1b488a97dd6d6dd88d4b583c05 Mon Sep 17 00:00:00 2001
|
||
|
From: Mike Dalessio <mike.dalessio@gmail.com>
|
||
|
Date: Thu, 3 Aug 2023 17:52:36 -0400
|
||
|
Subject: [PATCH 2/3] style: prefer Minitest to MiniTest
|
||
|
|
||
|
since Minitest 5.19 doesn't load it by default
|
||
|
---
|
||
|
.github/ISSUE_TEMPLATE/1-bug-report.md | 2 +-
|
||
|
CONTRIBUTING.md | 2 +-
|
||
|
test/helper.rb | 4 ++--
|
||
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md
|
||
|
index 297cd4de42..79d4bf6ff1 100644
|
||
|
--- a/.github/ISSUE_TEMPLATE/1-bug-report.md
|
||
|
+++ b/.github/ISSUE_TEMPLATE/1-bug-report.md
|
||
|
@@ -32,7 +32,7 @@ Here's an example of how you might structure such a script:
|
||
|
require 'nokogiri'
|
||
|
require 'minitest/autorun'
|
||
|
|
||
|
-class Test < MiniTest::Spec
|
||
|
+class Test < Minitest::Spec
|
||
|
describe "Node#css" do
|
||
|
it "should find a div using chained classes" do
|
||
|
html = <<~HEREDOC
|
||
|
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
|
||
|
index 336c9c5c14..a0f844d16e 100644
|
||
|
--- a/CONTRIBUTING.md
|
||
|
+++ b/CONTRIBUTING.md
|
||
|
@@ -124,7 +124,7 @@ Note that `rake test` does not compile the native extension, and this is intenti
|
||
|
bundle exec rake compile test
|
||
|
```
|
||
|
|
||
|
-To run a focused test, use MiniTest's `TESTOPTS`:
|
||
|
+To run a focused test, use Minitest's `TESTOPTS`:
|
||
|
|
||
|
``` sh
|
||
|
bundle exec rake compile test TESTOPTS="-n/test_last_element_child/"
|
||
|
diff --git a/test/helper.rb b/test/helper.rb
|
||
|
index ed3133c6e8..8d4569e87c 100644
|
||
|
--- a/test/helper.rb
|
||
|
+++ b/test/helper.rb
|
||
|
@@ -128,7 +128,7 @@ class TestBenchmark < Minitest::BenchSpec
|
||
|
end
|
||
|
|
||
|
# rubocop:disable Style/ClassVars
|
||
|
- class TestCase < MiniTest::Spec
|
||
|
+ class TestCase < Minitest::Spec
|
||
|
include TestBase
|
||
|
|
||
|
COMPACT_EVERY = 20
|
||
|
@@ -272,7 +272,7 @@ def assert_not_send(send_ary, m = nil)
|
||
|
def pending(msg)
|
||
|
begin
|
||
|
yield
|
||
|
- rescue MiniTest::Assertion
|
||
|
+ rescue Minitest::Assertion
|
||
|
skip("pending #{msg} [#{caller(2..2).first}]")
|
||
|
end
|
||
|
flunk("pending test unexpectedly passed: #{msg} [#{caller(1..1).first}]")
|
||
|
|
||
|
|