Skip to content

Commit

Permalink
Use self class for diff
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Sep 10, 2021
1 parent 3e32412 commit df86d78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tool/lib/test/unit/assertions.rb
Expand Up @@ -45,7 +45,7 @@ def diff exp, act
result = nil

need_to_diff =
MiniTest::Assertions.diff &&
self.class.diff &&
(expect.include?("\n") ||
butwas.include?("\n") ||
expect.size > 30 ||
Expand All @@ -68,7 +68,7 @@ def diff exp, act
b.puts butwas
b.flush

result = `#{MiniTest::Assertions.diff} #{a.path} #{b.path}`
result = `#{self.class.diff} #{a.path} #{b.path}`
result.sub!(/^\-\-\- .+/, "--- expected")
result.sub!(/^\+\+\+ .+/, "+++ actual")

Expand Down

0 comments on commit df86d78

Please sign in to comment.