Add Commit#==
Prior, comparison would use the Ruby object's ID, which got out of sync after a Spring fork and would result in erroneous test failures. Now we just check that the compared object is a Commit and then compare their underlying raw commit objects.
This commit is contained in:
parent
0ec1e4c028
commit
38cd3d6451
1 changed files with 4 additions and 0 deletions
|
@ -56,6 +56,10 @@ class Commit
|
|||
@raw.id
|
||||
end
|
||||
|
||||
def ==(other)
|
||||
(self.class === other) && (raw == other.raw)
|
||||
end
|
||||
|
||||
def diff_line_count
|
||||
@diff_line_count ||= Commit::diff_line_count(self.diffs)
|
||||
@diff_line_count
|
||||
|
|
Loading…
Reference in a new issue