rubygem-kramdown/rubygem-kramdown-2.2.1-minitest-warning-must_equal.patch
Mamoru TASAKA 4e0193a472 Wrap rexml depedency with fedora release
Add upstream patch for rouge change
Add upstream patch to silence warnings from minitest
2021-01-23 16:18:14 +09:00

46 lines
1.8 KiB
Diff

From dd1bab4ee32324db3a11f5712718792164bd38c8 Mon Sep 17 00:00:00 2001
From: Thomas Leitner <t_leitner@gmx.at>
Date: Sat, 27 Jun 2020 11:35:15 +0200
Subject: [PATCH] Use assert_equal instead of .must_equal in test cases
---
test/test_location.rb | 4 ++--
test/test_string_scanner_kramdown.rb | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/test_location.rb b/test/test_location.rb
index 41295dc4..d2642c78 100644
--- a/test/test_location.rb
+++ b/test/test_location.rb
@@ -18,7 +18,7 @@
def check_element_for_location(element)
if (match = /^line-(\d+)/.match(element.attr['class'] || ''))
expected_line = match[1].to_i
- element.options[:location].must_equal(expected_line)
+ assert_equal(expected_line, element.options[:location])
end
element.children.each do |child|
check_element_for_location(child)
@@ -187,7 +187,7 @@ def check_element_for_location(element)
*[duplicate]: The second definition
)
doc = Kramdown::Document.new(test_string.strip)
- doc.warnings.must_equal ["Duplicate abbreviation ID 'duplicate' on line 4 - overwriting"]
+ assert_equal(["Duplicate abbreviation ID 'duplicate' on line 4 - overwriting"], doc.warnings)
end
it 'handles abbreviations' do
diff --git a/test/test_string_scanner_kramdown.rb b/test/test_string_scanner_kramdown.rb
index a2c91ebc..713c03c4 100644
--- a/test/test_string_scanner_kramdown.rb
+++ b/test/test_string_scanner_kramdown.rb
@@ -21,7 +21,7 @@
it "computes the correct current_line_number for example ##{i + 1}" do
str_sc = Kramdown::Utils::StringScanner.new(test_string)
scan_regexes.each {|scan_re| str_sc.scan_until(scan_re) }
- str_sc.current_line_number.must_equal expect
+ assert_equal(expect, str_sc.current_line_number)
end
end
end