Skip to content

Commit

Permalink
Use assert_equal instead of .must_equal in test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
gettalong committed Jun 27, 2020
1 parent fc910f9 commit dd1bab4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/test_location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/test_string_scanner_kramdown.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dd1bab4

Please sign in to comment.